Generic attribute with value of length 1 without quotes is not recognized #174

Closed
opened 2026-01-29 14:29:28 +00:00 by claunia · 0 comments
Owner

Originally created by @AlekseyMartynov on GitHub (Dec 13, 2017).

0.14.8

var p = new MarkdownPipelineBuilder()
    .UseGenericAttributes()
    .Build();

var html = Markdown.ToHtml("![](url){data-x=1}", p);

html contains <p><img src="url" alt="" />{data-x=1}</p>

{data-x=11} and {data-x='1'} work fine.

Originally created by @AlekseyMartynov on GitHub (Dec 13, 2017). 0.14.8 ```c# var p = new MarkdownPipelineBuilder() .UseGenericAttributes() .Build(); var html = Markdown.ToHtml("![](url){data-x=1}", p); ``` `html` contains `<p><img src="url" alt="" />{data-x=1}</p>` `{data-x=11}` and `{data-x='1'}` work fine.
claunia added the bugPR Welcome! labels 2026-01-29 14:29:28 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#174