Footnotes are now first-class: [^label] references and their definitions survive normalize, update, extract, inline and squash, can be queried with the $footnote operator, and the editor supports go to definition, hover, references, completion, rename and folding for them. This release also fixes a stray space written between a code fence and its language, a * at the start of a paragraph flipping on every normalize, and the iwe_find MCP tool description.
Thanks @acroaticum-ns for reporting the footnote and iwe_find issues, @yinhx3 for reporting the code block fence spacing, and @jmollerhoj for reporting the normalize flip-flop.
iwe
Added
footnoteblock kind in$blocksand the$footnoteoperator in queries
Changed
- A footnote definition of several words is read as a footnote (previously a plain paragraph), so
normalizereformats its continuation lines and a four-space-indented block right after it becomes part of the footnote - Document schemas ignore footnote definitions, the way they ignore HTML blocks and comments
Fixed
- Code block language is written right after the fence, e.g.
```lang(previously``` lang), so renderers that don't trim the info string detect the language again create --contenthelp no longer claims the document is written verbatim; the body is normalizediwe normalizeleaves a paragraph that starts with a*glued to a word unchanged on repeated runs (previously it switched between\*and*every time)- Footnotes are kept on
normalizeandupdate: a one-word footnote definition is no longer turned into a link and lost, and[^label]stays a footnote reference extract,inlineandsquashkeep footnotes working: definitions follow the text that references them, and clashing labels are renamed
iwes
Added
- Go to definition, hover, find references, completion, rename and folding for footnotes
Changed
^is a default completion trigger character, so footnote labels are offered after[^(previously only[)- A footnote definition of several words is read as a footnote (previously a plain paragraph), so formatting reformats its continuation lines
Fixed
- Code block language is written right after the fence, e.g.
```lang(previously``` lang) - Formatting a note leaves a paragraph that starts with a
*glued to a word unchanged on repeated runs (previously it switched between\*and*every time) - Formatting keeps footnote references and definitions (previously a one-word definition was turned into a link and lost)
- Extract and inline code actions keep footnote definitions with the text that references them
iwec
Added
footnoteblock kind in$blocksand the$footnoteoperator iniwe_queryandiwe_updateblock filters
Changed
- A footnote definition of several words is read as a footnote (previously a plain paragraph), so writes reformat its continuation lines
Fixed
- Code block language is written right after the fence, e.g.
```lang(previously``` lang) iwe_findtool description names the arguments the tool accepts (previously it pointed clients toqueryandroots, which the tool rejects)iwe_update,iwe_normalizeandiwe_queryupdates keep footnote references and definitions (previously a one-word definition was turned into a link and lost)iwe_extract,iwe_inlineandiwe_squashkeep footnote definitions with the text that references them and rename clashing labels
Library crates (liwe, diwe)
liwe
Added
Inline::FootnoteReference,Block::FootnoteDefinition,Node::Footnote,GraphNode::Footnote,DocumentInline::FootnoteReferenceandDocumentBlock::FootnoteDefinitionmodel footnotesDocumentfootnote lookups (footnote_definition,footnote_references,footnote_labels,footnote_definition_at,footnote_reference_at,footnote_label_at)
Changed
CmarkTableWriter::newtakes the set of knownFootnoteLabels(previously onlyMarkdownOptions)- Markdown writer emits the code block info string right after the fence (previously separated by a space)
Fixed
- Markdown output for a paragraph that starts with a
*,-or+glued to a word no longer depends on how the text was split while reading, so writing it again gives the same result