diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-07-20 03:14:42 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-07-20 03:14:42 +0900 |
| commit | 1f1870a1852558166cabfdfdcc4bc1437e37a45a (patch) | |
| tree | 163ce5c5a7c6147c2f566b25e40dcadb9b210945 /services/blog/nuldoc-src/djot/djot2ndoc.ts | |
| parent | 037da3c3c4cf7d4e62cb5248ecccfe75d88f684b (diff) | |
| download | nsfisis.dev-1f1870a1852558166cabfdfdcc4bc1437e37a45a.tar.gz nsfisis.dev-1f1870a1852558166cabfdfdcc4bc1437e37a45a.tar.zst nsfisis.dev-1f1870a1852558166cabfdfdcc4bc1437e37a45a.zip | |
feat(blog/style): fix word-break style of links
Diffstat (limited to 'services/blog/nuldoc-src/djot/djot2ndoc.ts')
| -rw-r--r-- | services/blog/nuldoc-src/djot/djot2ndoc.ts | 6 |
1 files changed, 4 insertions, 2 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 { |
