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

GitHub Flavoured Markdown now supports footnotes, too #21

Closed
ichard26 opened this issue Dec 23, 2021 · 5 comments
Closed

GitHub Flavoured Markdown now supports footnotes, too #21

ichard26 opened this issue Dec 23, 2021 · 5 comments

Comments

@ichard26
Copy link

I just ran mdformat on my README for diff-shades locally as a pre-commit hook and it behaved rather poorly on the footnotes I'm trying to add 🙁 A workaround is also install the mdformat-myst plugin alongside this one.

 ## License
 
@@ -333,12 +339,12 @@ black-primer and mypy-primer.
 
 First public release, enjoy the alpha quality software :)
 
+\[^1\]: I'll fix this with a hash based solution eventually, but for now let's
+be careful. \[^2\]: I know it’s specifically for Black, but diff-shades is a
+development tool for Black so I consider it acceptable - although I never asked
+… but then again, I am a maintainer of Black so yeah :p
+
 [black-primer]: https://github.com/psf/black/tree/main/src/black_primer
 [mypy-primer]: https://github.com/hauntsaninja/mypy_primer/
 [nox]: https://nox.thea.codes/en/stable/
 [pre-commit]: https://pre-commit.com/
-
-[^1]: I'll fix this with a hash based solution eventually, but for now let's be careful.
-[^2]: I know it’s specifically for Black, but diff-shades is a development tool for Black so I consider it acceptable - although I never asked … but then again, I am a maintainer of Black so yeah :p

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


Sorry for the minimal bug report but I am kinda busy on other stuff right now but I didn't want to forget filing an issue by pushing it off til I had more time. Feel free to ask for more details!

@ichard26
Copy link
Author

post note: of course the GFM spec hasn't been updated to include footnotes, probably as wikis aren't supported yet if the rumours I've heard are true

@hukkin
Copy link
Owner

hukkin commented Dec 23, 2021

Thanks for the issue!

This is interesting. I'd argue that footnotes are not part of the GFM spec. The footnote extension is not now, nor has has it ever been described in the GFM text spec, see rendered HTML or source in VCS.

My understanding is that an off-by-default footnote extension was added to cmark-gfm a long time ago and was recently enabled on github.com. However, that doesn't make the extension part of the core specification IMO.

A workaround is also install the mdformat-myst plugin alongside this one.

This should work, but so should pip install mdformat-footnote in case you don't want to enable all the other syntax extensions included in mdformat-myst.

@ichard26
Copy link
Author

That's fair, I'll close this then and we can reopen if GitHub ever updates their formal specification for GFM.

This should work, but so should pip install mdformat-footnote in case you don't want to enable all the other syntax extensions included in mdformat-myst.

Thanks!

@Freed-Wu
Copy link

Now gfm support LaTex formula, can mdformat-gfm support it? executablebooks/mdformat#334

@ichard26
Copy link
Author

ichard26 commented Sep 17, 2022

@Freed-Wu the GFM specification hasn't been updated since 2019 which means it won't contain any recent additions like LaTex or footnotes so no, mdformat-gfm won't be supporting it.

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

3 participants