mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 01:05:55 +03:00
[GH-ISSUE #1298] [Feature Request] Checking Space around Embedded Code, Bold and Italic #2504
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#2504
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @fyc09 on GitHub (Jul 16, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1298
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
inlinecode一些 重要 的信息
一些
inline代码Incorrect:
someimportantpoint
some
inlinecode一些重要的信息
一些
inline代码@fyc09 commented on GitHub (Jul 17, 2024):
@DavidAnson Can we use micromark as the parser in customRules to simplify column calculations?
github.com/DavidAnson/markdownlint@b2305efafb/lib/markdownlint.js (L58-L66)@DavidAnson commented on GitHub (Jul 17, 2024):
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.
@Faker095 commented on GitHub (Dec 29, 2024):
if (
!result &&
(rule.parser !== undefined) &&
(rule.parser !== "markdownit") &&
!((customIndex < 0) && (rule.parser === "micromark")) &&
(rule.parser !== "none")
) {
result = newError("parser", rule.parser);
}
@DavidAnson commented on GitHub (Dec 29, 2024):
@fyc09, i'm not sure what the comment above is saying, but to get back to your question from six months ago, it is now possible to write custom rules that use the micromark parser. As you say, the line/column information should be easier to work with in that form. If you have any trouble, please let me know!