mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Fails to substitute (**) with <strong> tags for Japanese and Chinese languages. #650
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Jan 29, 2024).
Method Markdown.ToHtml doesn't convert ** to
<strong>when it appears before or after Japanese or Chinese symbols. For other languages, it works as expected.Example:
Text that I need to convert to html
**如果您需要重新安排教练时间,**请确保在原定教练时间前至少提前 **48 小时**重新预约教练环节,以便您的教练知悉情况并为其他学员安排时间以填补空档。The result from Markdig:
**如果您需要重新安排教练时间,**请确保在原定教练时间前至少提前 <strong>48 小时</strong>重新预约教练环节,以便您的教练知悉情况并为其他学员安排时间以填补空档。The result from Legacy Markdown package:
<strong>如果您需要重新安排教练时间,</strong>请确保在原定教练时间前至少提前 <strong>48 小时</strong>重新预约教练环节,以便您的教练知悉情况并为其他学员安排时间以填补空档。Could you please provide me with instructions on how to fix this issue correctly?
@xoofx commented on GitHub (Jan 29, 2024):
From the specs emphasis-and-strong-emphasis section:
So for this to be correctly formatted, you need to change it to:
**如果您需要重新安排教练时间**,请确保在原定教练时间前至少提前 **48小时**重新预约教练环节,以便您的教练知悉情况并为其他学员安排时间以填补空档如果您需要重新安排教练时间,请确保在原定教练时间前至少提前 48小时重新预约教练环节,以便您的教练知悉情况并为其他学员安排时间以填补空档
as shown on babelmark here
It is not possible to have
**如果您需要重新安排教练时间,**working for example, because the character,seems to be a space before the closing**, hence why it can't detect it.@ghost commented on GitHub (Jan 29, 2024):
It seems that I need to work on improving those templates. Thank you for bringing this to my attention!
@ghost commented on GitHub (Jan 29, 2024):
In Japanese and Chinese languages ", " and ". " are single char :(
https://www.compart.com/en/unicode/U+FF0C
So, I cannot remove space there.