Skip to content

Use ↩ as default params.FootnoteReturnLinkContents#547

Merged
russross merged 1 commit intorussross:v2from
adiabatic:v2
Feb 18, 2020
Merged

Use ↩ as default params.FootnoteReturnLinkContents#547
russross merged 1 commit intorussross:v2from
adiabatic:v2

Conversation

@adiabatic
Copy link

This changes the default params.FootnoteReturnLinkContents from <sup>[return]</sup> to <span aria-label='Return'>↩\ufe0e</span>.

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 jgm/pandoc#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.

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 <jgm/pandoc#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.
@russross russross merged commit 3b2b20c into russross:v2 Feb 18, 2020
@dmitshur
Copy link
Collaborator

dmitshur commented Nov 7, 2020

The documentation for the HTMLRendererParameters.FootnoteReturnLinkContents field also needs to be updated. It currently describes the old default value:

$ go doc github.com/russross/blackfriday/v2 HTMLRendererParameters.FootnoteReturnLinkContents
package blackfriday // import "github.com/russross/blackfriday/v2"

type HTMLRendererParameters struct {
    // Show this text inside the <a> tag for a footnote return link, if the
    // HTML_FOOTNOTE_RETURN_LINKS flag is enabled. If blank, the string
    // <sup>[return]</sup> is used.
    FootnoteReturnLinkContents string

    // ... other fields elided ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants