-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Short dash cannot be correctly rendered in yaml code. #4171
Comments
Hello @lxzxl, In Markdown you either indent code blocks with four spaces or you use fenced code blocks (i.e. the three backticks). Using both doesn't work. In the future, please refer to the Hugo Discussion Forum for questions. |
@digitalcraftsman Thank you for your answer! I found 8 spaces can solve the problem. |
@lxzxl @digitalcraftsman If I understand correctly, this is the same as this Blackfriday bug: russross/blackfriday#239. The hack I use only in such cases is to replace the the Markdown list chars dash (HYPHEN-MINUS) character or a PLUS SIGN (0x2b) with the HYPHEN character (which looks like HYPHEN-MINUS, but has a different binary code.. 0x2010 instead of 0x2d). That is enough to fool Blackfriday to get around this bug. |
@kaushalmodi Good idea, thank you! But the HYPHEN character breaks YAML file. So it doesn't work for my case. |
Gitlab, Github, even Okular in KDE shows the md files right. This is a BUG in Hugo. I don't know why this issue is closed.
The same issue applies also to asterix sign, and I think the same happen to other special chars that are at the beginning of a line in a code block. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hugo is an excellent tool but I got a problem about "-" in yaml code when it's inside of a list item. It seems that Hugo parses the short dash as a markdown list while it should be a yaml's list.
which result:
Thanks.
The text was updated successfully, but these errors were encountered: