-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Doesn't generate link ID if convert to markdown_strict when using link-citations. #9733
Comments
I'm sorry, I missed that you're converting to markdown_strict. That's why the id isn't coming through. There's no very good way to include it. In the AST, the ID is on a Div. The way to preserve the semantics would be to render the whole Div as HTML, but since markdown_strict doesn't allow markdown inside HTML blocks, that would be quite ugly. So I don't know if that is desirable? Looking just at this case, of course you suggest putting the id on the initial span. But the writer is a general-purpose renderer; so the question is, how are we in general going to handle a Div with an id when rendering markdown_strict? The Div might not always begin with a Span, and might not even begin with a Para. |
Discussed in #9729
Originally posted by Watterry May 7, 2024
I use link-citations: true to generate Hugo markdown( or you can say markdown_strict), the command I am using is:
I am using "link-citations: true" in my index.md file to generate citation links. There is a strange thing here, the reference list generated by pandoc doesn't contain any ID property to let linking. Here is the result:
If I generate HTML result of the above markdown file, the result will contain ID property:
So I'm curious, in the markdown output, if there is no ID attribute, in the final HTML page rendered by Hugo, there is no way for the citation of a reference to jump to the corresponding entry in the Reference list. If I want to make sure that a reference citation jumps to the corresponding reference entry, I need to manually put in an ID similar to the HTML output above.
So, is there any way to write this ID into the span tag when using the link-citations parameter to convert the markdown file?
Also, I'm wondering, is this considered a bug?
The text was updated successfully, but these errors were encountered: