From 627330f7e80e2eac0f92663bbdaaf39962e97bbe Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 20 Mar 2023 21:56:24 +0900 Subject: feat(nuldoc): implement admonition block --- nuldoc-src/docbook/to_html.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'nuldoc-src') diff --git a/nuldoc-src/docbook/to_html.ts b/nuldoc-src/docbook/to_html.ts index 9f176d4..f347f05 100644 --- a/nuldoc-src/docbook/to_html.ts +++ b/nuldoc-src/docbook/to_html.ts @@ -236,20 +236,21 @@ function transformNoteElement(doc: Document) { const labelElement: Element = { kind: "element", name: "div", - attributes: new Map(), + attributes: new Map([["class", "admonition-label"]]), children: [{ kind: "text", - content: "Note", - raw: true, + content: "NOTE", + raw: false, }], }; const contentElement: Element = { kind: "element", name: "div", - attributes: new Map(), + attributes: new Map([["class", "admonition-content"]]), children: n.children, }; n.name = "div"; + addClass(n, "admonition"); n.children = [ labelElement, contentElement, -- cgit v1.2.3-70-g09d2