all repos — grayfriday @ 412ca19665064fba55ff7624ba5bcab9afdfb4d0

blackfriday fork with a few changes

Use ↩ as default params.FootnoteReturnLinkContents

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.
Nathan Galt adiabatic@users.noreply.github.com
Mon, 10 Jun 2019 16:05:36 -0700
commit

412ca19665064fba55ff7624ba5bcab9afdfb4d0

parent

792d13404204e12d4c292c77184f47ad325fcfdc

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M html.gohtml.go

@@ -132,7 +132,10 @@ closeTag = xhtmlClose

} if params.FootnoteReturnLinkContents == "" { - params.FootnoteReturnLinkContents = `<sup>[return]</sup>` + // U+FE0E is VARIATION SELECTOR-15. + // It suppresses automatic emoji presentation of the preceding + // U+21A9 LEFTWARDS ARROW WITH HOOK on iOS and iPadOS. + params.FootnoteReturnLinkContents = "<span aria-label='Return'>↩\ufe0e</span>" } return &HTMLRenderer{