-
Notifications
You must be signed in to change notification settings - Fork 171
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
Footnotes #64
Conversation
Would love some review from @vmg and/or @charliesome. |
src/commonmark.c
Outdated
@@ -162,6 +162,8 @@ static cmark_node *get_containing_block(cmark_node *node) { | |||
return NULL; | |||
} | |||
|
|||
static unsigned int footnote_ix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proooobably not fine. 😄
It seems like this single variable stops the whole library from being threadsafe. Can we give this some more thought? Surely the footnote index can fit in one of the many state structs we're already passing around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TOTALLY FINE.
(Shit, yeah.)
@kivikakk - What is the timeline for this footnote extension to be enabled in GitHub or for gists? |
There are no plans to enable the extension on GitHub.com or in gists. This is for Pages only. |
@kivikakk - Needless to say, this makes me really sad, but I really appreciate your definitive answer. |
* Add baseline test * Some preliminary work. * cont'd * Add footnote reference * Start postprocessing * MVP: tests pass * commonmark footnote out * Factor out reference/footnote maps * fix a memory leak & some asserts * We don't assert/check snprintf elsewhere * Remove bad linear search, extend test case * cleanup * man page update * add footnotes as option * bugfix (found in comrak first!) * Shift static var into renderer struct
@metasean Good news: Footnotes now supported in Markdown fields. |
Fixes #56. Adds support for footnotes to
cmark-gfm
. This is a key requirement of being able to be used where Kramdown is; for instance, Kramdown is the default Markdown renderer in GitHub Pages.This PR does the following:
To-do:
fix thewhatever it's finestatic unsigned int ix;
hack incommonmark.c
snprintf
results and turn them into asserts