Italic and bold markdown notations not recognized correctly
2 posters
Page 1 of 1
Italic and bold markdown notations not recognized correctly
I just finished the translation at https://openbve-project.net/documentation_hugo/zh_cn/routes/csv.html, and it turned out not working very well.
There are quite a few stars (*) floating around in the document, 462 of them to be exact. And they are from italic and bold notations which are not correctly parsed. I tried to parse the markdown files using multiple online parsers and typora, and no such problem is encountered. How can I get the symbols fixed?
There are quite a few stars (*) floating around in the document, 462 of them to be exact. And they are from italic and bold notations which are not correctly parsed. I tried to parse the markdown files using multiple online parsers and typora, and no such problem is encountered. How can I get the symbols fixed?
Re: Italic and bold markdown notations not recognized correctly
Thank you for your translation work.
First of all, please check the notation of markdown.
https://www.markdownguide.org/basic-syntax/
When modifying characters such as italics, a space is required before and after (*).
Since the translation is already completed, you need to lower the translation completion rate once from 100% or make an empty commit on GitHub.
Otherwise, the changes will not be reflected on the web page.
First of all, please check the notation of markdown.
https://www.markdownguide.org/basic-syntax/
When modifying characters such as italics, a space is required before and after (*).
- Code:
AAAA *BBB* CCC
Since the translation is already completed, you need to lower the translation completion rate once from 100% or make an empty commit on GitHub.
Otherwise, the changes will not be reflected on the web page.
Re: Italic and bold markdown notations not recognized correctly
I have also read this manual given by you. It says right there:S520 wrote:When modifying characters such as italics, a space is required before and after (*).
- Code:
AAAA *BBB* CCC
https://www.markdownguide.org/basic-syntax/#italic wrote:To italicize the middle of a word for emphasis, add one asterisk without spaces around the letters.
Markdown | HTML | Rendered Output |
|
| Acatmeow |
I tested the code of paragraphs that are incorrectly shown in babelmark, and the result is that 34 out of 36 markdown parser implementions succeed in recognizing italic notation without space before and after, and succeed in parsing my entire markdown file without serious formatting issues. Please see this.
Anyway I will try to use some regex clause to fix the errors in my files. But it seems that it is caused by "unstandard" behavior of the parser used by hugo site generator. I would prefer, maybe changing the parser used now to be one compatible with such notations, since I am not good at regex
Re: Italic and bold markdown notations not recognized correctly
Hmm...
We are using Hugo v0.53.
This version uses blackfriday internally.
https://gohugo.io/getting-started/configuration-markup/#blackfriday
blackfriday doesn't seem to parse correctly like the site you indicated because it doesn't conform to CommonMark.
However, Hugo uses Goldmark instead of blackfriday since v0.60.
https://gohugo.io/getting-started/configuration-markup/#goldmark
I think Goldmark is likely to parse correctly because it conforms to CommonMark.
Therefore, I will work on upgrading Hugo.
We are using Hugo v0.53.
This version uses blackfriday internally.
https://gohugo.io/getting-started/configuration-markup/#blackfriday
blackfriday doesn't seem to parse correctly like the site you indicated because it doesn't conform to CommonMark.
However, Hugo uses Goldmark instead of blackfriday since v0.60.
https://gohugo.io/getting-started/configuration-markup/#goldmark
I think Goldmark is likely to parse correctly because it conforms to CommonMark.
Therefore, I will work on upgrading Hugo.
Re: Italic and bold markdown notations not recognized correctly
Ah, I see the problem. It is one of the only two which do not support this syntaxS520 wrote:This version uses blackfriday internally.
https://gohugo.io/getting-started/configuration-markup/#blackfriday
Thank you!
Re: Italic and bold markdown notations not recognized correctly
By the way, some personal idea about the new hugo documentation:S520 wrote:Therefore, I will work on upgrading Hugo.
1. The language list is currently aligned to the left of the button, and it overflows the page. This can be solved by changing the line 930 of /documentation_hugo/css/bulma.custom.css to
- Code:
right: 0;
- Code:
color: #004488;
3. There are many warnings about This command can only be used at the beginning of a block.
They are pure red in the hugo documentation, and I personally think there are too much of them and messed up the colours of the page, while flooding other more important notes. Would you by any change degrade them to notices, or use a less saturated color?
4. The document currently does not fit mobile devices well so far. I hope it can be better...
Re: Italic and bold markdown notations not recognized correctly
I have prepared a preview site that has been upgraded to 0.66.0.
https://5e64b9e61a1681409f0977c6--openbve-japan.netlify.com/en/
It seems that there are some points where the display has improved and some points where it has deteriorated.
Let's compare the sentence of the following page as an example.
https://5e64b9e61a1681409f0977c6--openbve-japan.netlify.com/zh_cn/routes/csv.html
0.53: Blackfriday
0.66.0: Goldmark (CommonMark compliant)
(As reference) CommonMark: https://spec.commonmark.org/dingus/
To be honest, I can't say which is better...
Next, let's talk about page design.
First, please know how this document was born.
The original document described HTML directly.
Because it is difficult to update or multilingualize as it is, we switched to Hugo using markdown.
To make the modified document more acceptable, the appearance has not changed much from the original.
As a result, current documents are difficult to read on smartphones.
Unfortunately I'm not familiar with page design, so I'm very happy if you make suggestions on GitHub's pull requests etc.
https://5e64b9e61a1681409f0977c6--openbve-japan.netlify.com/en/
It seems that there are some points where the display has improved and some points where it has deteriorated.
Let's compare the sentence of the following page as an example.
https://5e64b9e61a1681409f0977c6--openbve-japan.netlify.com/zh_cn/routes/csv.html
0.53: Blackfriday
- Code:
这个文件一般来说可以被放在*Train*或*Railway*文件夹下的任何地方。文件名可以随意,但扩展名必须是.csv。
0.66.0: Goldmark (CommonMark compliant)
- Code:
这个文件一般来说可以被放在Train或Railway文件夹下的任何地方。文件名可以随意,但扩展名必须是**.csv**。
(As reference) CommonMark: https://spec.commonmark.org/dingus/
- Code:
这个文件一般来说可以被放在Train或Railway文件夹下的任何地方。文件名可以随意,但扩展名必须是**.csv**。
To be honest, I can't say which is better...
Next, let's talk about page design.
First, please know how this document was born.
The original document described HTML directly.
Because it is difficult to update or multilingualize as it is, we switched to Hugo using markdown.
To make the modified document more acceptable, the appearance has not changed much from the original.
As a result, current documents are difficult to read on smartphones.
Unfortunately I'm not familiar with page design, so I'm very happy if you make suggestions on GitHub's pull requests etc.
Re: Italic and bold markdown notations not recognized correctly
I actually know this since I have already done a translation upon the [original html document (I have no idea why this link on the left doesn't get highlighted)] years ago, and I copied the texts over this time. But you can certainly see a difference in the link color between them...S520 wrote:To make the modified document more acceptable, the appearance has not changed much from the original.
You can see the color of the new document is not as dark, and its appearance is not as clear.
I actually would be happy to agree migrating to a commonmark compatible parser, since it decrases the number of problems to 70, which seems easier to fix manually. Thank you so much!
Re: Italic and bold markdown notations not recognized correctly
I have submitted a pull request.
https://github.com/leezer3/OpenBVE-Documentation-Hugo/pull/15
The outline has been described, but please supplement any missing parts.
https://github.com/leezer3/OpenBVE-Documentation-Hugo/pull/15
The outline has been described, but please supplement any missing parts.
Similar topics
» Obj Files not loaded correctly
» Some objs not loaded correctly
» object using new renderer in object viewer not blend texture correctly than using old renderer
» Some objs not loaded correctly
» object using new renderer in object viewer not blend texture correctly than using old renderer
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum