diff options
Diffstat (limited to 'services/blog/nuldoc-src')
| -rw-r--r-- | services/blog/nuldoc-src/djot/djot2ndoc.ts | 6 | ||||
| -rw-r--r-- | services/blog/nuldoc-src/djot/to_html.ts | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/services/blog/nuldoc-src/djot/djot2ndoc.ts b/services/blog/nuldoc-src/djot/djot2ndoc.ts index 2abb6ce3..627e8d63 100644 --- a/services/blog/nuldoc-src/djot/djot2ndoc.ts +++ b/services/blog/nuldoc-src/djot/djot2ndoc.ts @@ -46,7 +46,7 @@ import { Url as DjotUrl, Verbatim as DjotVerbatim, } from "@djot/djot"; -import { elem, Element, Node, rawHTML, text } from "../dom.ts"; +import { addClass, elem, Element, Node, rawHTML, text } from "../dom.ts"; function processBlock(node: DjotBlock): Element { switch (node.tag) { @@ -419,7 +419,7 @@ function processFootnoteReference(node: DjotFootnoteReference): Element { } function processUrl(node: DjotUrl): Element { - return elem( + const e = elem( "a", { href: node.text, @@ -427,6 +427,8 @@ function processUrl(node: DjotUrl): Element { }, text(node.text), ); + addClass(e, "url"); + return e; } function processSpan(node: DjotSpan): Element { diff --git a/services/blog/nuldoc-src/djot/to_html.ts b/services/blog/nuldoc-src/djot/to_html.ts index c4939d5b..8219b747 100644 --- a/services/blog/nuldoc-src/djot/to_html.ts +++ b/services/blog/nuldoc-src/djot/to_html.ts @@ -115,7 +115,7 @@ function transformLinkLikeToAnchorElement(doc: Document) { } const [_, prefix, url, suffix] = match; nodes.push(text(prefix)); - nodes.push(elem("a", { href: url }, text(url))); + nodes.push(elem("a", { href: url, class: "url" }, text(url))); restContent = suffix; } return nodes; |
