Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MdFootNote for GitHub footnotes #11

Open
Cloud-Awesome opened this issue Oct 1, 2021 · 2 comments
Open

Add MdFootNote for GitHub footnotes #11

Cloud-Awesome opened this issue Oct 1, 2021 · 2 comments

Comments

@Cloud-Awesome
Copy link
Owner

Cloud-Awesome commented Oct 1, 2021

e.g.

// This can be included in an MdParagraph instance
var footnote = new MdFootNote{
    Reference: "1", // produces [^1] in markdown
    Footnote: new MdParagraph("This is the text, that can include other children such as MdLink, etc. etc.")
};

N.B. An MdDocument instance will need a private dictionary of all footnotes, not just the usual .MarkDown getter used in other classes, that they can be processed at the end of the document.

Don't think this is supported outside of GitHub (yet?). Should it be included in a GitHub-specific namespace?

@Cloud-Awesome
Copy link
Owner Author

Cloud-Awesome commented Oct 18, 2021

Re. Having it as a separate namespace, I'm going to go with not splitting it out.1

My docfx-templates repo will implement them and either way, it's the only GFM item I'm aware of that isn't (yet) implemented elsewhere.

Do, however, put an XML comment on there so consumers are aware.

Footnotes

  1. For reference... https://github.blog/changelog/2021-09-30-footnotes-now-supported-in-markdown-fields/

@Cloud-Awesome
Copy link
Owner Author

I can see numbering/naming the references themselves could cause issues... And at least it's a wasted effort... Given that the plan is to add them to a doc-level dictionary could it be auto-numbered instead?

PoC up an example input to test usage before implementation ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant