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

[Feature Request] Checking Space around Embedded Code, Bold and Italic #1298

Open
fyc09 opened this issue Jul 16, 2024 · 2 comments
Open

[Feature Request] Checking Space around Embedded Code, Bold and Italic #1298

fyc09 opened this issue Jul 16, 2024 · 2 comments
Labels

Comments

@fyc09
Copy link
Contributor

fyc09 commented Jul 16, 2024

Adding spaces around embedded code, bold, and italics is common practice to prevent unexpected rendering errors and make words recognizable. While Chinese can be recognized without spaces, adding spaces can enhance clarity and readability.

Correct:

some *important* point
some `inline` code
一些 *重要* 的信息
一些 `inline` 代码

some important point
some inline code
一些 重要 的信息
一些 inline 代码

Incorrect:

some*important*point
some`inline`code
一些*重要*的信息
一些`inline`代码

someimportantpoint
someinlinecode
一些重要的信息
一些inline代码

@fyc09 fyc09 changed the title [Feature Request] Checking Space around Bold and Italic [Feature Request] Checking Space around Embedded Code, Bold and Italic Jul 16, 2024
@fyc09
Copy link
Contributor Author

fyc09 commented Jul 17, 2024

@DavidAnson Can we use micromark as the parser in customRules to simplify column calculations?

if (
!result &&
(rule.parser !== undefined) &&
(rule.parser !== "markdownit") &&
!((customIndex < 0) && (rule.parser === "micromark")) &&
(rule.parser !== "none")
) {
result = newError("parser", rule.parser);
}

@DavidAnson
Copy link
Owner

Not yet. I want to convert the remaining core rules to micromark first, then review the API. Custom rules can still use markdown-it and the "helpers" package, but I am slowly removing things from that as I migrate, so feel free to use or copy from earlier versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants