[GH-ISSUE #1560] New rule to warn about (unordered) list items missing space between the list item marker and the text #2556

Open
opened 2026-03-07 20:08:51 +03:00 by kerem · 7 comments
Owner

Originally created by @dreambe on GitHub (Apr 7, 2025).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1560

unsupport those *,-,+ ,**,#, behind should have a withespace

Originally created by @dreambe on GitHub (Apr 7, 2025). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1560 unsupport those *,-,+ ,**,#, behind should have a withespace
Author
Owner

@DavidAnson commented on GitHub (Apr 7, 2025):

Please provide more context, say which rule(s) this references, and provide an example of the behavior you think is incorrect. Your current issue title is not enough to go on.

<!-- gh-comment-id:2782208342 --> @DavidAnson commented on GitHub (Apr 7, 2025): Please provide more context, say which rule(s) this references, and provide an example of the behavior you think is incorrect. Your current issue title is not enough to go on.
Author
Owner

@dreambe commented on GitHub (Apr 7, 2025):

another question ,中文符号的问题。this just because Chinese brackets: ()

Image

标题

example 1

**(你好朋友)**哈哈哈哈哈

example 2

(你好朋友) 哈哈哈哈哈

<!-- gh-comment-id:2782331810 --> @dreambe commented on GitHub (Apr 7, 2025): another question ,中文符号的问题。this just because Chinese brackets: () ![Image](https://github.com/user-attachments/assets/e7cecd5f-4eff-4a35-855b-225487012491) # 标题 ## example 1 **(你好朋友)**哈哈哈哈哈 ## example 2 **(你好朋友)** 哈哈哈哈哈
Author
Owner

@dreambe commented on GitHub (Apr 7, 2025):

unsupport those *,-,+ ,**,#, behind should have a withespace

Image

标题

example 1

-hello

example 2

  • hello
<!-- gh-comment-id:2782342463 --> @dreambe commented on GitHub (Apr 7, 2025): > unsupport those *,-,+ ,**,#, behind should have a withespace ![Image](https://github.com/user-attachments/assets/8178be74-7a69-4c8c-b746-d79187a38a0f) # 标题 ## example 1 -hello ## example 2 - hello
Author
Owner

@DavidAnson commented on GitHub (Apr 7, 2025):

I still don't understand what issue you are reporting. The above are examples of Markdown and I don't see anything having to do with markdownlint. For example, spaces are required after a list item marker per the specification: https://spec.commonmark.org/0.31.2/#list-items. But the last example above seems to suggest no space should be required?

<!-- gh-comment-id:2783831306 --> @DavidAnson commented on GitHub (Apr 7, 2025): I still don't understand what issue you are reporting. The above are examples of Markdown and I don't see anything having to do with markdownlint. For example, spaces are required after a list item marker per the specification: <https://spec.commonmark.org/0.31.2/#list-items>. But the last example above seems to suggest no space should be required?
Author
Owner

@dreambe commented on GitHub (Apr 8, 2025):

I still don't understand what issue you are reporting. The above are examples of Markdown and I don't see anything having to do with markdownlint. For example, spaces are required after a list item marker per the specification: https://spec.commonmark.org/0.31.2/#list-items. But the last example above seems to suggest no space should be required?

Sorry about poor English

The examples above demonstrate that when using Markdown formatting, if the last character inside a bold (**) block is a Chinese punctuation mark, the rendering is incorrect — unless a space is added after the closing **, in which case it displays properly.

The second example shows that in English, an unordered list item written as -hello is rendered exactly as -hello, and only when a space is added after the hyphen (i.e., - hello) does it become a proper list item.

Additionally, these issues are not flagged by markdownlint, even though they can lead to rendering errors or unexpected results.

<!-- gh-comment-id:2785142021 --> @dreambe commented on GitHub (Apr 8, 2025): > I still don't understand what issue you are reporting. The above are examples of Markdown and I don't see anything having to do with markdownlint. For example, spaces are required after a list item marker per the specification: https://spec.commonmark.org/0.31.2/#list-items. But the last example above seems to suggest no space should be required? Sorry about poor English The examples above demonstrate that when using Markdown formatting, if the last character inside a bold (**) block is a Chinese punctuation mark, the rendering is incorrect — unless a space is added after the closing **, in which case it displays properly. The second example shows that in English, an unordered list item written as -hello is rendered exactly as -hello, and only when a space is added after the hyphen (i.e., - hello) does it become a proper list item. Additionally, these issues are not flagged by markdownlint, even though they can lead to rendering errors or unexpected results.
Author
Owner

@DavidAnson commented on GitHub (Apr 9, 2025):

Thank you, I understand now! I think you're pointing out two Markdown behaviors that could have new rules added to markdownlint to detect and warn about them.

The first example behaves the same in English and Chinese with and without parenthesis. Embedded emphasis is rare, especially with parenthesis, so I do not think this is worth adding a new rule for.

The second example happens in English and I agree it's a mistake people could make and a new rule could help with that.

Demonstration of CommonMark behavior:

https://dlaa.me/markdownlint/#%25m%23%20Issue%201560%0A%0A---%0A%0AEnglish%20parens%20ignore%20embedded%20emphasis%3A%0A%0A**(text)text%0A%0A(text)%20text%0A%0AChinese%20behaves%20the%20same%3A%0A%0A%EF%BC%88%E4%BD%A0%E5%A5%BD%E6%9C%8B%E5%8F%8B%EF%BC%89**%E5%93%88%E5%93%88%E5%93%88%E5%93%88%E5%93%88%0A%0A**%EF%BC%88%E4%BD%A0%E5%A5%BD%E6%9C%8B%E5%8F%8B%EF%BC%89**%20%E5%93%88%E5%93%88%E5%93%88%E5%93%88%E5%93%88%0A%0AEnglish%20without%20parens%20applies%20embedded%20emphasis%3A%0A%0Atexttext%0A%0AChinese%20behaves%20the%20same%3A%0A%0A**%E4%BD%A0%E5%A5%BD%E6%9C%8B%E5%8F%8B**%E5%93%88%E5%93%88%E5%93%88%E5%93%88%E5%93%88%0A%0A---%0A%0AForgetting%20to%20put%20a%20space%20after%20a%20list%20item%20marker%20does%20not%20create%20a%20list%20item%20(the%20space%20is%20required%20by%20the%20CommonMark%20specification)%3A%0A%0A-not%20a%20list%20item%0A%0A-%20list%20item%0A

<!-- gh-comment-id:2788218246 --> @DavidAnson commented on GitHub (Apr 9, 2025): Thank you, I understand now! I think you're pointing out two Markdown behaviors that could have new rules added to `markdownlint` to detect and warn about them. The first example behaves the same in English and Chinese with and without parenthesis. Embedded emphasis is rare, especially with parenthesis, so I do not think this is worth adding a new rule for. The second example happens in English and I agree it's a mistake people could make and a new rule could help with that. Demonstration of CommonMark behavior: https://dlaa.me/markdownlint/#%25m%23%20Issue%201560%0A%0A---%0A%0AEnglish%20parens%20ignore%20embedded%20emphasis%3A%0A%0A**(text)**text%0A%0A**(text)**%20text%0A%0AChinese%20behaves%20the%20same%3A%0A%0A**%EF%BC%88%E4%BD%A0%E5%A5%BD%E6%9C%8B%E5%8F%8B%EF%BC%89**%E5%93%88%E5%93%88%E5%93%88%E5%93%88%E5%93%88%0A%0A**%EF%BC%88%E4%BD%A0%E5%A5%BD%E6%9C%8B%E5%8F%8B%EF%BC%89**%20%E5%93%88%E5%93%88%E5%93%88%E5%93%88%E5%93%88%0A%0AEnglish%20without%20parens%20applies%20embedded%20emphasis%3A%0A%0A**text**text%0A%0AChinese%20behaves%20the%20same%3A%0A%0A**%E4%BD%A0%E5%A5%BD%E6%9C%8B%E5%8F%8B**%E5%93%88%E5%93%88%E5%93%88%E5%93%88%E5%93%88%0A%0A---%0A%0AForgetting%20to%20put%20a%20space%20after%20a%20list%20item%20marker%20does%20not%20create%20a%20list%20item%20(the%20space%20is%20required%20by%20the%20CommonMark%20specification)%3A%0A%0A-not%20a%20list%20item%0A%0A-%20list%20item%0A
Author
Owner

@dreambe commented on GitHub (Apr 14, 2025):

strongly sugesst add a new rule the first example

<!-- gh-comment-id:2801284073 --> @dreambe commented on GitHub (Apr 14, 2025): strongly sugesst add a new rule the first example
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2556
No description provided.