Added language-specific syntax highlighting support to the markdown editor and preview. New code-highlighter assets are registered for public pages and admin headers. The PostContentRenderer detects language identifiers in code fences to apply appropriate CSS classes for highlighting. Tests verify the highlighting works correctly and unsafe content is escaped properly.
19 lines
454 B
JSON
19 lines
454 B
JSON
{
|
|
"name": "plugi-ext-blog",
|
|
"type": "module",
|
|
"dependencies": {
|
|
"@codemirror/commands": "^6.11.2",
|
|
"@codemirror/lang-markdown": "^6.5.3",
|
|
"@codemirror/language": "^6.13.1",
|
|
"@codemirror/view": "^6.44.2",
|
|
"@lezer/highlight": "^1.2.5",
|
|
"highlight.js": "^11.11.1"
|
|
},
|
|
"devDependencies": {
|
|
"rolldown": "^1.3.3"
|
|
},
|
|
"scripts": {
|
|
"build": "node build.js",
|
|
"test": "node --test tests/CodeHighlighterTest.js"
|
|
}
|
|
} |