전역 하루 전!!!! Still struggling with footnote implementation. when index id is not provided, hash markup and use it as footnote identifier. I'm not sure if it should be first-class feature... I can implement footnote references right now, but I cannot implement footnote definition yet. make method to walk through tree and find the required node. (this can be used to query headings) use it for: find anchor definition with hashid to resolve anchor reference query heading & get it's id (replace original definition) Being referenced can occur change on referenced node (e.g. add ...But this won't work for nodes that are referenced from external documents. So every reference-able nodes should have Exporter will be given a Ahhh no. First one cannot be pre-provided. Again, think when referencing external file's node. And second one cannot be provided until we expand all tags. So actual steps will be: parse document expand all tags (including inline tags) and collect pass expanded AST & exporter will first resolve anchor with given anchor-table and then find for So my actual TODO is: rewrite Node types (to include split ast ( anchor-table ( implement using all these, refactor entire export system But this will take quite a time. So I'll first migrate my blog with current semi-working system, introduce CommonNorg spec to others, and then start refactoring entire system. I'll set a time limit. migrate blog until Wednesday. (hopefuly Tuesday) introduce CommonNorg on Thursday. rewrite node types until Friday. (ignore inline nodes for now) rewrite entire system until Sunday. finish with migrating inline nodes until Monday.norg-rs & norgolith
Footnote problem
How I want to write footnotes
Named definition
paragraph\fn[text]
.def-fn text;footnote definition content
Indexed definition
paragraph\fn(2)
paragraph\fn(1)
#def-fn-list
~ footnote definition content 1
~ footnote definition content 2
Short version
paragraph{^ 1}
#def-fn-list
~ footnote definition content 1
Implementation plan:
id
field, etc) So first, collect all unique link targets from document. Walk through document and find referenced node's id. Add id to that nodes.uid
field regardless of they are actually referenced or not. Querying a node is a job finding node's uid based on given query (* heading : ** heading
). Every inline nodes aren't referenceable by default. uid
in an inline node is an optional field. User can use \ref
or \fn
inline tags to add uid
.LinkTarget -> UID
hashmap and MarkupHash -> LinkTarget
hashmap.MarkupHash -> LinkTarget
table.MarkupHash -> LinkTarget
table to exporterUID
when link target contains Scopes
(cache it for later use of course)uid
and attributes
field for each nodes)(norg/export/doc)
to (norg/expand/ast)
and (norg/export/ast)
(norg/expand/ast)
will returnVec<Block>
)HashMap<Markup, LinkTarget>
)(norg/find/ast)
to search for node (query node by structural position or anchor definition hashid)