Skip to content
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

Bold rendering issues #263

Closed
l739217783 opened this issue Jul 19, 2023 · 3 comments · Fixed by #280
Closed

Bold rendering issues #263

l739217783 opened this issue Jul 19, 2023 · 3 comments · Fixed by #280
Labels
Breaking Change dependencies Pull requests that update a dependency file

Comments

@l739217783
Copy link

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

@uiolee
Copy link
Member

uiolee commented Sep 12, 2023

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)

图片

@l739217783
Copy link
Author

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:

Demo 1
Demo 2

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).

landscape主题
Fludi主题

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"

@uiolee uiolee added the bug label Sep 12, 2023
@uiolee uiolee added the dependencies Pull requests that update a dependency file label Apr 6, 2024
@stevenjoezhang
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants