-
Notifications
You must be signed in to change notification settings - Fork 257
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
typographer extension should ignore code element content #308
Comments
This works as expected. CommonMark spec does not have handlings for specific inline HTML tags. See Raw HTML section in CommonMark spec. CommonMark dingus renders contents between
|
Please re-open.
The smartypants documentation states:
Goldmark currently handles cc: @kaushalmodi |
'like smartypants' does not mean that typographer extension is smartypants.
Thus
is not correct. |
@yuin Can you please separate the CommonMark spec from the Smart quotes feature? The latter feature is anyways not part of the CommonMark spec. If a user has While I agree that CommonMark spec allows the rendering of Markdown inside |
No. Original smartypants is defined for HTMLs, but Typographer extension is defined for CommonMark. It is unnatural that CommonMark parser handles specific inline HTML elements. Other implementation also behaves in same way about inline HTMLs. Example: markdown-it Could you tell me CommonMark implementations that behave way you want? |
I perceive this is an oversight in the CommonMark spec .. I have put more details in commonmark/commonmark-spec#711. I don't understand why the CommonMark spec would allow polluting the user content which the user explicitly marked as "dont' touch"! The This issue was raised from a practical issue I noticed here: If a user reading my blog copied that rendered portion with the curved quotes, they will get a Nim compilation failure! I had expected the smart quoting to not touch the While I would hope this to be properly fixed in CommonMark, it would be great if at least the smart quotations can leave out the code-related HTML elements like |
Good action 👍 goldmark is a CommonMark parser. If commonmark/commonmark-spec#711 is accepted, I will implement it as defined. |
I'm a neutral about this. From the point of view of CommoMark related product users, it makes sense. But the point of view of CommoMark library author, this is not straightforward solution for your requirements. It would be better solutions that spec defines attributes for backticks like |
main.go
Desired output:
Actual output:
The text was updated successfully, but these errors were encountered: