SmartyPants: even occurrences of double quotes are not recognized #176

Closed
opened 2026-01-29 14:29:30 +00:00 by claunia · 1 comment
Owner

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

0.14.8

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

var html = Markdown.ToHtml("\"aaa\" - \"bbb\" - \"ccc\" - \"ddd\"", p);

html is <p>&ldquo;aaa&rdquo; - &quot;bbb&quot; - &ldquo;ccc&rdquo; - &quot;ddd&quot;</p>

Note the alternation of ldquo-rdquo and quot-quot

Originally created by @AlekseyMartynov on GitHub (Dec 13, 2017). 0.14.8 ```c# var p = new MarkdownPipelineBuilder() .UseSmartyPants() .Build(); var html = Markdown.ToHtml("\"aaa\" - \"bbb\" - \"ccc\" - \"ddd\"", p); ``` `html` is `<p>&ldquo;aaa&rdquo; - &quot;bbb&quot; - &ldquo;ccc&rdquo; - &quot;ddd&quot;</p> ` Note the alternation of `ldquo-rdquo` and `quot-quot`
claunia added the bugPR Welcome! labels 2026-01-29 14:29:30 +00:00
Author
Owner

@deanebarker commented on GitHub (Apr 12, 2019):

I've found this too, but weirdly, it's alternating "sets" of quotes:

You spend a lot of time saying things like, “Where in
the world did all of this come from?” and "I don’t even
remember this" and “Who put this here?”

Three quoted phrases. The middle one ("I don't even remember this") retains straight quotes, while the other two have their quotes replaced.

@deanebarker commented on GitHub (Apr 12, 2019): I've found this too, but weirdly, it's alternating "sets" of quotes: ``` You spend a lot of time saying things like, “Where in the world did all of this come from?” and "I don’t even remember this" and “Who put this here?” ``` Three quoted phrases. The middle one ("I don't even remember this") retains straight quotes, while the other two have their quotes replaced.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#176