Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use ↩ as default params.FootnoteReturnLinkContents #547

Merged
merged 1 commit into from
Feb 18, 2020
Merged

Use ↩ as default params.FootnoteReturnLinkContents #547

merged 1 commit into from
Feb 18, 2020

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 ...
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants