Description
The proposal is to fully support the markdown footnote extension, as commonly used in pandoc, php, and the goldmark footnote extension, including rendering of super and subscripts.
The GitHub Flavored Markdown Spec does not list footnotes. However GitHub.com has supported them for some time. See GH #48 for examples of rendering. Most unicode based terminals can render super and subscripts.
The current behavior is pass through, un-styled and untransformed.
I’m happy to work on a PR, but wanted to poll interest and get feedback before starting.
Proposed Changes
I'm new to the code base but looking it over, I see the following changes will be needed:
- glamour.go needs to add the footnote marks extension.
- ansi/ansi.go needs
Superscript and Subscript as pure style transformations (similar to Upper and Lower work).
- ansi/baseelement.go adds unicode transforms taking 0-9 to the super/sub script equivalent. This is 20 LOC and I have this in another project. Could be put in file, new file, new module (I have other unicode stuff to add), or in your 'x' repo.
- ansi/render.go appears to have some registration of footnote nodes. May need updating.
- styles/README.md — need documentation on footnote ast elements, need documentation on super and sub scripts.
- probably something linking all this to stylesheets. I haven’t looked into this yet.
- perhaps default styles updated
Related:
Description
The proposal is to fully support the markdown footnote extension, as commonly used in pandoc, php, and the goldmark footnote extension, including rendering of super and subscripts.
The GitHub Flavored Markdown Spec does not list footnotes. However GitHub.com has supported them for some time. See GH #48 for examples of rendering. Most unicode based terminals can render super and subscripts.
The current behavior is pass through, un-styled and untransformed.
I’m happy to work on a PR, but wanted to poll interest and get feedback before starting.
Proposed Changes
I'm new to the code base but looking it over, I see the following changes will be needed:
SuperscriptandSubscriptas pure style transformations (similar to Upper and Lower work).Related:
<sup>tag rendering )