diff options
Diffstat (limited to 'vhosts/blog/nuldoc-src/djot/to_html.ts')
| -rw-r--r-- | vhosts/blog/nuldoc-src/djot/to_html.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vhosts/blog/nuldoc-src/djot/to_html.ts b/vhosts/blog/nuldoc-src/djot/to_html.ts index c765cb07..3a6c1e9f 100644 --- a/vhosts/blog/nuldoc-src/djot/to_html.ts +++ b/vhosts/blog/nuldoc-src/djot/to_html.ts @@ -199,14 +199,17 @@ function transformNoteElement(doc: Document) { return; } - // TODO: 今のセクションレベルに合わせた h* タグにしたい + const editatAttr = n.attributes?.get("editat"); + const operationAttr = n.attributes?.get("operation"); + const isEditBlock = editatAttr && operationAttr; + const labelElement: Element = { kind: "element", name: "div", attributes: new Map([["class", "admonition-label"]]), children: [{ kind: "text", - content: "NOTE", + content: isEditBlock ? `${editatAttr} ${operationAttr}` : "NOTE", raw: false, }], }; |
