-
-
Notifications
You must be signed in to change notification settings - Fork 452
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
Nested italics #562
Comments
Markdig is following the CommonMark specification with this behavior and as such won't change. If you want different behavior, you can use CSS (I assume) to configure how nested italics are rendered. FWIW, I would personally prefer the text be formatted as "You must perform this test in the sandbox database." ( |
That's too bad, but I understand. Thanks. |
@CharlesJenkins It depends on where you put the asterisks. You can stop italics before must and restart italics afterwards. |
Thank you, Thomas. My request was to make italics automatically work they way they are supposed to work in publishing, without making users fool with the markdown in order to achieve proper behavior. But the devs don't want that, and it is their project, their choice! |
It's not about the devs that don't want but the fact that Markdig is following the CommonMark specs. There is a specs precisely for this reason: to avoid having fragmented Markdown custom rules (that sometimes can create awful ambiguate parser problems). GitHub is now following also CommonMark. The specs don't allow what you are looking for. |
In typesetting, when italics are used for emphasis inside a section of text which is already italicized, the emphasized text should appear in roman type. An example would be: You must perform this test in the sandbox database. The emphasized word "must" should appear in roman type as a contrast to the rest of the italicized text.
Markdig cannot currently switch back and forth like that. It would be ideal if Markdig could handle the following syntax to produce an italicized sentence with the word "must" in roman type:
*You *must* perform this test in the sandbox database.*
That would make typesetting with Markdig work correctly, but I realize it may be a difficult change to make. However, that sample syntax does not screw up the surrounding italics, so I think the parser is already parsing it correctly and producing the exact syntax tree you would need; but Markdig simply isn't making the check to see if the surrounding text is already italicized before deciding to renter the word "must" in italics.
The text was updated successfully, but these errors were encountered: