aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/docbook
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-03-20 21:56:24 +0900
committernsfisis <nsfisis@gmail.com>2023-03-20 21:56:24 +0900
commit627330f7e80e2eac0f92663bbdaaf39962e97bbe (patch)
tree2b0fe134325970bca32b2121567ebdc43d7a8980 /nuldoc-src/docbook
parente5e6d918a474f5704270835d24eb686f13a67cf8 (diff)
downloadblog.nsfisis.dev-627330f7e80e2eac0f92663bbdaaf39962e97bbe.tar.gz
blog.nsfisis.dev-627330f7e80e2eac0f92663bbdaaf39962e97bbe.tar.zst
blog.nsfisis.dev-627330f7e80e2eac0f92663bbdaaf39962e97bbe.zip
feat(nuldoc): implement admonition block
Diffstat (limited to 'nuldoc-src/docbook')
-rw-r--r--nuldoc-src/docbook/to_html.ts9
1 files changed, 5 insertions, 4 deletions
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,