Get LinkInline.Title of "" rather than null for [link](/uri) #738

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

Originally created by @RamType0 on GitHub (May 10, 2025).

We get LinkInline.Title of "" with CommonMark Example 443.

[link](/uri)

As LinkInline.Title is typed as string? rather than string, it is weird.

3535701d70/src/Markdig/Renderers/Html/Inlines/LinkInlineRenderer.cs (L72-L77)

HtmlRenderer render correct result for [link](/uri) with current parse behavior, but it will generate incorrect result for [link](/uri "") instead.

Originally created by @RamType0 on GitHub (May 10, 2025). We get `LinkInline.Title` of `""` with [CommonMark Example 443](https://spec.commonmark.org/0.22/#example-443). > `[link](/uri)` As `LinkInline.Title` is typed as `string?` rather than `string`, it is weird. https://github.com/xoofx/markdig/blob/3535701d70066d055d06adaeaa1531b10601c6ac/src/Markdig/Renderers/Html/Inlines/LinkInlineRenderer.cs#L72-L77 `HtmlRenderer` render correct result for `[link](/uri)` with current parse behavior, but it will generate incorrect result for `[link](/uri "")` instead.
claunia added the bugPR Welcome! labels 2026-01-29 14:44:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#738