You can now run the following code to disable smart parens:
```
mdOpt = blackfriday.WithRenderer(blackfriday.NewHTMLRenderer(blackfriday.HTMLRendererParameters{
Flags: blackfriday.CommonHTMLFlags ^ blackfriday.SmartypantsParens,
}))
blackfriday.Run([]byte(...), mdOpt)
```
This changes the default `params.FootnoteReturnLinkContents` from `<sup>[return]</sup>` to `↩\ufe0e`.
It’s very common to use `↩` in footnote links. However, some platforms like iOS and iPadOS choose to use emoji presentation for this particular character. This leads to lots of blogs, by default, looking silly on portable Apple gizmos, as described in <https://github.com/jgm/pandoc/issues/5469>. By switching to a return arrow with a disable-emojification variation selector, we get blackfriday to do the right thing by default.
Additionally, ↩ is more language-agnostic than “return” is, so blackfriday will work better out of the box for more people.
Unexport a bunch of constants private to HTML renderer
They were cluttering the documentation and are not useful otherwise.
Rearrange constants in descending dependencies order
Improve Renderer to be less confusing. Fix documentation for it.
OmitContents flag got dropped along the way. First, it would fit poorly
into the new design and second, it's unclear how widely this feature is
used. But most importantly, it's trivial to roll your own with the v2
API: https://gist.github.com/rtfb/2693f6bfcc1760661e8d2fb832763a15Fixes#368.
The root problem this commit fixes is the duplication of Extensions
field in HTMLRendererParameters. The duplication crept in there only to
support these two flags, so moving the flags solves the problem. They're
only used in renderer anyway.
Fixes#277.
Using strings in helper functions causes a lot of string-to-[]byte
allocations. This fix is centered around converging the tag() helper
func to the []byte lingo. In order to do that, a lot of string literals
have moved to global variables, where string to []byte conversion can
happen once.
Clean up footnotes part of an AST: don't force HTML-specific pieces
there, just keep a clean list of footnotes. Since some renderers might
want to process footnotes differently, let them know about footnotes by
having a flag on that list.