You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it feels like the markdown display will simply jam markdown interpretation of * and _ on any matching pair.
(very simplified description)
This upsets quite some usages.
the * is the most widely adopted (and prefered by affected people) way to indicate inclusive gender designations in German. This is messed up on display when people use the * that way, by, for example, saying Entwickler*innen und Tester*innen (the * disappear and the center part will be italic). See issue Gendersternchen incorrectly parsed as Markdown italics #1290.
Simple multiplication is messed up in a similar way, see Excessive markdown parsing #1509. Most importatnly, this is the use the * was initially intended for.
The same holds for _, although to a lesser extent. _ has its uses in IT-related posts, and not everyone wants to use backquotes (because, again, they might not be using elk or any markdowning client in the first place.
Most "funnily", C function signatures are all over the place. Consider:
followed by one to three of * or _ (adjacent space to the left)
followed by at least one character not being * or _. Maybe has * or _ embedded 1
followed by one to three of * or _, that match the characters found in 2., but mirrored.
optionally followed by puctuation (eg, .,;?:!)
followed by at least one space (adjacent space to the right).
Test cases
This *has* emphasis.
This th*ng does n*ot.
This one is *debat*able*
from markdownguide
I just love **bold text**.
I just love __bold text__.
NOT: Love**is**bold -- see caveat
Italicized text is the *cat's meow*.
Italicized text is the _cat's meow_.
NOT: A*cat*meow -- see caveat
This text is ***really important***.
This text is ___really important___.
This text is __*really important*__.
This text is **_really important_**.
NOT: This is really***very***important text. -- see caveat
YES: *foo bar*
NO: a * foo bar*
NO: a*"foo"*
NO: * a *
NO: *$*alpha.
NO: *£*bravo.
NO: *€*charlie.
YES: foo*bar* --- debatable
NO: 5*6*78 -- see caveat
NO: _foo*
NO: *foo bar *
NO:
*foo bar
*
NO: *(*foo)
YES: *(*foo*)* -- debatable, not considered here
YES:
*foo
bar*
YES: *foo **bar** baz*
NO: *foo**bar**baz* -- see caveat
(_, double-*, and double-_ cases ommitted, but its virtually identical)
Caveat
This on purpose violates the recommendation in this markdown guide and commonmark.
The guide, for example, recommends rendering A*cat*meowwith inter-word-emphasis, which is explicitly not recommended here.
Commonmark already restricts it to inner-word-*, disallowing _:
internal emphasis: foo*bar*baz
no emphasis: foo_bar_baz
The case foo*bar* from commonmark is debatable. applyinh
Footnotes
This restriction is only a simple case. Naurally, nesting, or switching between italic/bold emphasis needs more work. Also, singular, non-matched* might be allowed. ↩
The text was updated successfully, but these errors were encountered:
Currently, it feels like the markdown display will simply jam markdown interpretation of
*
and_
on any matching pair.(very simplified description)
This upsets quite some usages.
*
is the most widely adopted (and prefered by affected people) way to indicate inclusive gender designations in German. This is messed up on display when people use the*
that way, by, for example, sayingEntwickler*innen und Tester*innen
(the*
disappear and the center part will be italic). See issue Gendersternchen incorrectly parsed as Markdown italics #1290.*
was initially intended for.The same holds for
_
, although to a lesser extent._
has its uses in IT-related posts, and not everyone wants to use backquotes (because, again, they might not be using elk or any markdowning client in the first place.Most "funnily", C function signatures are all over the place. Consider:
Proposal
Only apply emphasis to text iff:
*
or_
(adjacent space to the left)*
or_
. Maybe has*
or_
embedded 1*
or_
, that match the characters found in 2., but mirrored..,;?:!
)Test cases
from markdownguide
Commonmark
(
_
, double-*
, and double-_
cases ommitted, but its virtually identical)Caveat
This on purpose violates the recommendation in this markdown guide and commonmark.
The guide, for example, recommends rendering
A*cat*meow
with inter-word-emphasis, which is explicitly not recommended here.Commonmark already restricts it to inner-word-
*
, disallowing_
:The case
foo*bar*
from commonmark is debatable. applyinhFootnotes
This restriction is only a simple case. Naurally, nesting, or switching between italic/bold emphasis needs more work. Also, singular, non-matched
*
might be allowed. ↩The text was updated successfully, but these errors were encountered: