mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #533] MD037: false positive for nested asterisks within an emphasized word #2283
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#2283
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 @wvanderp on GitHub (Jun 21, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/533
markdownlint marks the following markdown as having an error:
**co****ha**bitation **pro**jectI don't have any ideas for a fix but I am available for more questions.
and I might be able to look into it some day
@DavidAnson commented on GitHub (Jun 21, 2022):
Is this a real example? I think it could be written more simply in a way that would not trigger this violation.
@DavidAnson commented on GitHub (Jun 21, 2022):
My idea to use "_" didn't work, but here is something that is a little more clear about what it's trying to do and doesn't produce a violation:
**co\*\*\*\*ha**bitation **pro**ject@wvanderp commented on GitHub (Jun 21, 2022):
My goal is to highlight co, ha, and pro.
So that it is cohabilitation project
Although I see now that removing the asterisks between the letters is a better option and that GitHubs markdown parser also struggles with my notation
**Co****ha**bilitation **pro**jectresults in Co****habilitation project@DavidAnson commented on GitHub (Jun 21, 2022):
If your intent is not to include the asterisks, then your original text is not what do you want under CommonMark: http://markdown-it.github.io/#md3=%7B%22source%22%3A%22%2A%2Aco%2A%2A%2A%2Aha%2A%2Abitation%20%2A%2Apro%2A%2Aject%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Afalse%2C%22_view%22%3A%22html%22%7D%7D
Why not just
**coha**like you did with "project"?@wvanderp commented on GitHub (Jun 21, 2022):
Thank you for working through the problem with me.
So my practical problem is solved now. But now, we are left with a theoretical problem.
When I look at the "ast" on the page you linked, then
co****hais marked as plain text surrounded by bold tags.and by extension, it doesn't have any problems
The inclusion of asterisks in the bolt tags messes up the parsing done by this program. Because it things
bilitationis inside of the tags.You can put this report at the bottom of the pile or close it because who would put asterisks inside of bold tags :)
but I do honestly think that this is something to someday look at.
Thanks again for the quick responses and the help
@DavidAnson commented on GitHub (Jun 21, 2022):
Yes, thanks, I am leaving this open because I really try not to report issues against valid Markdown.
@DavidAnson commented on GitHub (Jun 22, 2022):
I'm going to tag this "Enhancement" instead of "Bug" which is technically a cheat, but this feels like a pretty unlikely scenario with seemingly unpredictable behavior that I think simple regular expression parsing isn't going to be able to deal with easily: example.