-
Notifications
You must be signed in to change notification settings - Fork 132
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
BEGIN_SRC in footnote exports verbatim #433
Comments
Thanks for reporting this. While I don't see the exported Markdown as seen by you, I see that the exported Markdown is not correct for code blocks in footnotes.. I see:
I don't know if Hugo/CommonMark would support code blocks in foot-notes.. This will need to be investigated. |
@winny- I just tested this out locally.. it's not possible to support source blocks (or any multi-line element) in the footnotes as Hugo doesn't support multi-line content in footnotes. I have added your test case to the ox-hugo test suite to demonstrate that: https://ox-hugo.scripter.co/test/issues/443-src-block-in-footnote/ |
@winny- Please bring this up on Hugo Discourse. Active users there might have ideas on how to make this work. If you can come up with a Markdown file that shows the source code formatting correctly in footnotes, I can work to make ox-hugo export in that format. |
Hugo now supports Goldmark by default which uses a different footnote backend, specifically php-markdown's footnote extension. This supports multi-line footnotes. Copying the example on the PHP-markdown page, That's some text with a footnote.[^1]
[^1]: And that's the footnote.
That's the second paragraph. |
Actual Behavior
The footnote is exported with the BEGIN_SRC verbatim.
Expected Behavior
The footnote is exported with a markdown code block.
I tried editing the resulting
md
document so the multi-line code block appears in the footnote, but hugo appears to move the block to the bottom of the post's body. Could this be a hugo limitation? In contrast, the Org HTML Export appears to allow code blocks in footnotes.How to Reproduce the Issue
Example Org File
Generated Markdown File or Error
Ox-Hugo Debug Information
Debug Info
Debug information for
ox-hugo
Emacs Version
Org Version
Hugo Version
Org
load-path
shadowsWarning: Possible mixed installation of Org
Study the output of
M-x list-load-path-shadows
.ox-hugo
defcustomsThe text was updated successfully, but these errors were encountered: