Wrong smart quotes around some links
The second quotation mark in '[link](#)' is sometimes rendered incorrectly as an open quote, instead of as a close quote. This does not happen if the second quotation mark is followed by a period, but it does happen if the second quotation mark is followed by a colon or by a line break. So:
This is rendered '[correctly](#)'.
This is '[rendered](#)': incorrectly.
This is rendered '[correctly](#)'.
This is '[rendered](#)': incorrectly.
Hmm, @tf3, with my system both are correct (6…9). My setup looks like this:
extensions := bf.WithExtensions(
bf.Autolink |
bf.BackslashLineBreak |
bf.DefinitionLists |
bf.FencedCode |
bf.Footnotes |
bf.HeadingIDs |
bf.NoIntraEmphasis |
bf.SpaceHeadings |
bf.Strikethrough |
bf.Tables)
r := bf.NewHTMLRenderer(bf.HTMLRendererParameters{
Flags: bf.FootnoteReturnLinks |
bf.Smartypants |
bf.SmartypantsFractions |
bf.SmartypantsDashes |
bf.SmartypantsLatexDashes,
})
result := bf.Run(aMarkdown, bf.WithRenderer(r), extensions)
What options do you use to produce your incorrect result?
I actually wasn't using Blackfriday directly. I was using Hugo, which uses Blackfriday to process Markdown files.
I just tried using Blackfriday by itself with the default options, and everything was correct. I'm not sure what options Hugo uses. Maybe the problem arises only with certain options, or maybe the problem is something else on Hugo's end. So I think I'll report the problem to them.