This commit is contained in:
10
AGENTS.md
10
AGENTS.md
@@ -220,7 +220,15 @@ copy + an `APP_LANGUAGES` entry + the code in the backend's `SUPPORTED_LOCALES`.
|
||||
- `app/utils/markdown.ts` — the single render pipeline: `markdown-it` (**html: false**,
|
||||
raw HTML is escaped) + `markdown-it-texmath` + KaTeX (`$...$` inline, `$$...$$` display,
|
||||
macros `\R \N \Z \Q \C`) + highlight.js, sanitized with DOMPurify. It also builds the
|
||||
TOC. Render all article Markdown through this, not ad-hoc renderers.
|
||||
TOC. Fenced blocks tagged ` ```example / theorem / corollary / definition / proof /
|
||||
proposition / lemma ` (optionally followed by a title) render as callout boxes —
|
||||
blockquote-styled, collapsible through a native `<details>` whose summary is the
|
||||
label row (always opens open; MarkdownView animates the fold with the Web
|
||||
Animations API — the intent rides on `data-open`, motion skipped under
|
||||
`prefers-reduced-motion`), each kind with its own hue (`--box-*` in
|
||||
`_tokens.scss`, shape `.md-box` in `_prose.scss`) and a label written in the
|
||||
*article's* language (`MarkdownView`'s `articleLang` → `renderMarkdown`'s env,
|
||||
never the UI locale). Render all article Markdown through this, not ad-hoc renderers.
|
||||
- API calls use `$fetch` against `${useRuntimeConfig().public.apiBase}/api`.
|
||||
|
||||
## Gotchas
|
||||
|
||||
Reference in New Issue
Block a user