summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/djot/djot2ndoc.ts
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-04-09 20:28:28 +0900
committernsfisis <nsfisis@gmail.com>2025-04-09 22:24:37 +0900
commit1e2f2e68286ce018c57945ab3cdcbaaf484377ee (patch)
tree87f160362cafc79c7e45ebb3415fe6ef9524151c /vhosts/blog/nuldoc-src/djot/djot2ndoc.ts
parentdbc3e0dfd893435f31cca39873f7ba9bf13b93a6 (diff)
downloadnsfisis.dev-1e2f2e68286ce018c57945ab3cdcbaaf484377ee.tar.gz
nsfisis.dev-1e2f2e68286ce018c57945ab3cdcbaaf484377ee.tar.zst
nsfisis.dev-1e2f2e68286ce018c57945ab3cdcbaaf484377ee.zip
feat(blog/content): convert from .ndoc to .dj
Diffstat (limited to 'vhosts/blog/nuldoc-src/djot/djot2ndoc.ts')
-rw-r--r--vhosts/blog/nuldoc-src/djot/djot2ndoc.ts54
1 files changed, 31 insertions, 23 deletions
diff --git a/vhosts/blog/nuldoc-src/djot/djot2ndoc.ts b/vhosts/blog/nuldoc-src/djot/djot2ndoc.ts
index 07071441..d1559f2f 100644
--- a/vhosts/blog/nuldoc-src/djot/djot2ndoc.ts
+++ b/vhosts/blog/nuldoc-src/djot/djot2ndoc.ts
@@ -529,13 +529,20 @@ function processEmail(node: DjotEmail): Element {
};
}
-function processFootnoteReference(node: DjotFootnoteReference): Element {
+function processFootnoteReference(node: DjotFootnoteReference): Node {
+ void node;
+ // TODO
return {
- kind: "element",
- name: "footnoteref",
- attributes: new Map([["reference", node.text]]),
- children: [],
+ kind: "text",
+ content: "",
+ raw: false,
};
+ // return {
+ // kind: "element",
+ // name: "footnoteref",
+ // attributes: new Map([["reference", node.text]]),
+ // children: [],
+ // };
}
function processUrl(node: DjotUrl): Element {
@@ -792,24 +799,25 @@ export function djot2ndoc(doc: DjotDoc): Element {
// Process footnotes if any exist
if (doc.footnotes && Object.keys(doc.footnotes).length > 0) {
- const footnoteSection: Element = {
- kind: "element",
- name: "section",
- attributes: new Map([["class", "footnotes"]]),
- children: [],
- };
-
- for (const [id, footnote] of Object.entries(doc.footnotes)) {
- const footnoteElement: Element = {
- kind: "element",
- name: "footnote",
- attributes: new Map([["id", id]]),
- children: footnote.children.map(processBlock),
- };
- footnoteSection.children.push(footnoteElement);
- }
-
- children.push(footnoteSection);
+ // TODO
+ // const footnoteSection: Element = {
+ // kind: "element",
+ // name: "section",
+ // attributes: new Map([["class", "footnotes"]]),
+ // children: [],
+ // };
+ //
+ // for (const [id, footnote] of Object.entries(doc.footnotes)) {
+ // const footnoteElement: Element = {
+ // kind: "element",
+ // name: "footnote",
+ // attributes: new Map([["id", id]]),
+ // children: footnote.children.map(processBlock),
+ // };
+ // footnoteSection.children.push(footnoteElement);
+ // }
+ //
+ // children.push(footnoteSection);
}
return {