From 412ca19665064fba55ff7624ba5bcab9afdfb4d0 Mon Sep 17 00:00:00 2001 From: Nathan Galt Date: Mon, 10 Jun 2019 16:05:36 -0700 Subject: [PATCH] =?UTF-8?q?Use=20=E2=86=A9=20as=20default=20params.Footnot?= =?UTF-8?q?eReturnLinkContents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This changes the default `params.FootnoteReturnLinkContents` from `[return]` 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 . 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. --- html.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/html.go b/html.go index 284c871..63b7435 100644 --- a/html.go +++ b/html.go @@ -132,7 +132,10 @@ func NewHTMLRenderer(params HTMLRendererParameters) *HTMLRenderer { } if params.FootnoteReturnLinkContents == "" { - params.FootnoteReturnLinkContents = `[return]` + // 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 = "↩\ufe0e" } return &HTMLRenderer{