summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/djot/to_html.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vhosts/blog/nuldoc-src/djot/to_html.ts')
-rw-r--r--vhosts/blog/nuldoc-src/djot/to_html.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/vhosts/blog/nuldoc-src/djot/to_html.ts b/vhosts/blog/nuldoc-src/djot/to_html.ts
index b64c3d99..e2d6a9b6 100644
--- a/vhosts/blog/nuldoc-src/djot/to_html.ts
+++ b/vhosts/blog/nuldoc-src/djot/to_html.ts
@@ -367,6 +367,7 @@ async function transformAndHighlightCodeBlockElement(doc: Document) {
const language = n.attributes.get("language") || "text";
const filename = n.attributes.get("filename");
+ const numbered = n.attributes.get("numbered");
const sourceCodeNode = n.children[0] as Text | RawHTML;
const sourceCode = sourceCodeNode.content.trimEnd();
@@ -382,6 +383,10 @@ async function transformAndHighlightCodeBlockElement(doc: Document) {
n.attributes.set("class", "codeblock");
n.attributes.delete("language");
+ if (numbered === "true") {
+ n.attributes.delete("numbered");
+ addClass(n, "numbered");
+ }
if (filename) {
n.attributes.delete("filename");