Giter Site home page Giter Site logo

Comments (4)

about-code avatar about-code commented on June 2, 2024

I suspect what causes the references to be displayed verbatim is the fact that the markdown AST stringifier remark-stringify used internally translates the colon of the footnote into an HTML entity sequence, so instead of

This is a text with a footnote [^footnote].

[^footnote]: This is correct

it renders

This is a text with a footnote [^footnote].

[^footnote]: This is wrong

I played around with the respective remark-stringify options options.gfm and options.entities with no success so far. Part of the problem could be that there is no distinct representation of footnotes in the AST produced by remark-parse which adheres to the CommonMark Specfication. This spec, which is currently at v0.29, doesn't specify footnotes, so they must be considered custom markdown extensions of the markdown-it toolsuite used with vuepress.

This is not to say it's impossible to solve but just to provide a bit more context to the issue and why footnotes do not work out of the box at the moment.

from glossarify-md.

about-code avatar about-code commented on June 2, 2024

Okay turned out to be easier than expected. After a look at the source files I found that remark-parse and remark-stringify both already implement support for footnotes but the feature must be enabled explicitely with the parser and options.footnotes (instead of the stringifier where I looked first).

Since they are not yet officially part of the CommonMark Spec glossarify-md v2.1.0 will also require explicit feature toggling by a separate boolean config option experimentalFootnotes. When set to true footnotes will be rendered according to Pandoc syntax as expected by markdown-it-footnote.

from glossarify-md.

MrGung avatar MrGung commented on June 2, 2024

Thanks for the ultra fast fix. I'll bump up the Version on monday.

from glossarify-md.

MrGung avatar MrGung commented on June 2, 2024

Works! Thanks!

from glossarify-md.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.