hexo-renderer-marked
hexo-renderer-marked copied to clipboard
Bold rendering issues
English parentheses linking asterisks cannot be rendered correctly in bold For example: reps (Endpoint): xxxx
Chinese parentheses can be rendered in bold For example: reps (Endpoint): xxxx
exist.
I think this issue is related to marked version.
source
**test(zh_parentheses)**:en_colon
**test(zh_parentheses)**:zh_colon
**test(en_parentheses)**:en_colon
**test(en_parentheses)**:zh_colon
**test(en_parentheses with space after)** :zh_colon
**test(en_parentheses):**zh_colon inside
marked online demo
marked v4.3.0 (current version, same as hexo-renderer-marked output)
marked v5.0.4 (same as markedv9, github-markdown's and commonMark's output)
Hello, developer.
I have attempted to reproduce the issue, and it still persists. Initially, I thought it might be due to the theme or a misconfiguration in my custom CSS. I am using the Fluid theme. Therefore, I set up a completely new blog using the default landscape theme, but the issue remains the same. Hence, I suspect it is a problem with the rendering of the plugin.
I have provided two demo URLs to replicate the issue (both contain the same content, but I'm not sure if you can access them from your location, so I'm providing two options). You can take a look at the demos, and if you cannot access them, please refer to the accompanying images:
I have also attached corresponding screenshots: Attachment 1 shows the rendering effect in the landscape theme. Attachment 2 shows the rendering effect in the Fluid theme (since both are identical, it suggests a plugin rendering issue).
Test text:
**服务地址(Endpoint)**:English parentheses (no spacing between the content and the asterisks)
**服务地址(Endpoint)** :With intervals
**服务地址 (Endpoint)** :Chinese parentheses (without spacing)
**服务地址 (Endpoint)** :Chinese parentheses (with spacing before and after)
If there is a space between the asterisk (*) and the colon (:), the content will be rendered properly. However, if there is no space, it will not be rendered correctly. On the other hand, this issue does not exist in Chinese. Regardless of whether there is a space between the asterisk and the colon, the content will be rendered without any problem.
I have tested the text you provided again and it seems there are no issues. The problem might be caused by the presence of Chinese characters within the bolded text.
Here is a list of all the packages and plugins I am using:
"hexo": "^7.0.0-rc2" "hexo-deployer-git": "^4.0.0" "hexo-generator-archive": "^2.0.0" "hexo-generator-category": "^2.0.0" "hexo-generator-feed": "^3.0.0" "hexo-generator-index": "^3.0.0" "hexo-generator-tag": "^2.0.0" "hexo-renderer-ejs": "^2.0.0" "hexo-renderer-marked": "^6.1.1" "hexo-renderer-stylus": "^3.0.0" "hexo-server": "^3.0.0" "hexo-theme-fluid": "^1.9.5-a"
If we consider the output from the new version (after v5.0.4) of marked to be correct, then the pull request #280 can fix this issue.