Skip to content

Commit fedb217

Browse files
committed
👾 use flashcard agent to create highlight.js classes on <code> tags
1 parent 654bfb5 commit fedb217

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

backend/statemachine/agents/flashcards/templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
1. **Front**: `<h3>{{concept}}</h3>`
2020
2. **Back** layout (all HTML, no Markdown):
2121
• definition → `<div class="definition">…</div>`, can be slightly formatted with html tags if applicable, otherwise use as is
22-
• example → if exists wrap in `<pre><code class="hljs">…</code></pre>`
22+
• example → if exists wrap in `<pre><code class="hljs (detect language from snippet and add highlight.js class of that langauge, example: language-go)">…</code></pre>`
2323
• anti-pattern→ if exists wrap in `<div class="anti">️…</div>`
2424
• contrast → if exists wrap in `<div class="contrast">(can use emojis at the beginning like ☣,⚠, or similar)…</div>`
2525
• source → if exists wrap in `<div class="source">(can use emojis at the beginning like ☯,🔀 or similar ️)…</div>`

frontend/src/app/layout.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import './globals.css'
2+
// TODO: handle locally
3+
// eslint-disable-next-line import/no-unresolved
4+
import 'highlight.js/styles/nnfx-light.css'
25

36
import { Toaster } from '@components/ui/toaster'
47
import type { Metadata } from 'next'

frontend/src/components/containers/chat.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
'use client'
22

3-
// TODO: handle locally
4-
// eslint-disable-next-line import/no-unresolved
5-
import 'highlight.js/styles/nnfx-light.css'
3+
64

75
import { Button } from '@components/ui/button'
86
import { logger } from '@lib/logger.ts'

0 commit comments

Comments
 (0)