Empty LiteralInline #45

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

Originally created by @Kryptos-FR on GitHub (Jul 24, 2016).

The following markdown generates an empty LiteralInline before the line break (notice the empty spaces at the end of the line to force a break) :

> *some text* 
> some other text

whereas this doesn't:

> some text 
> some other text

As a workaround, in my renderer, I can check if the content of the literal is empty and ignore it in this case. But IMHO it should be the job of the parser to get rid of it in the first place.

if (obj.Content.IsEmpty)
    return;
Originally created by @Kryptos-FR on GitHub (Jul 24, 2016). The following markdown generates an empty LiteralInline before the line break (notice the empty spaces at the end of the line to force a break) : ``` > *some text* > some other text ``` whereas this doesn't: ``` > some text > some other text ``` As a workaround, in my renderer, I can check if the content of the literal is empty and ignore it in this case. But IMHO it should be the job of the parser to get rid of it in the first place. ``` csharp if (obj.Content.IsEmpty) return; ```
claunia added the enhancement label 2026-01-29 14:23:03 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#45