Nested italics #471

Open
opened 2026-01-29 14:37:37 +00:00 by claunia · 0 comments
Owner

Originally created by @CharlesJenkins on GitHub (Jul 12, 2021).

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.

Originally created by @CharlesJenkins on GitHub (Jul 12, 2021). 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#471