Closed tjex closed 1 year ago
Yep, will get to this in a bit. It’s already implemented in micromark-extension-gfm-footnote
and markdown-rs
As discussed here, the rendering of the arrow seems to depend on the host environment
Hmm, it’s more: in the same way that the host may define which font is used for your website. You can use CSS to style your website. And you can use CSS for this too. See also https://css-tricks.com/text-that-sometimes-turns-to-emojis/. The fact that this happens is that GitHub uses the exact same character, but displays it differently from your site
excellent! and thanks for the extra info :)
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
Solved upstream, will be here in a bit!
legend! thanks mate :)
Initial checklist
Problem
Currently the symbol used in
mdast-util-to-hast
gets rendered as an emoji arrow.As discussed here, the rendering of the arrow seems to depend on the host environment. On my Astro site they get rendered as an emoji arrow as above (where I only use the default markdown packages remark-gfm and smarty-pants, but here on github, footnotes get rendered as a normal text arrow ^1.
Solution
As described above, the rendering behaviour due to the host environment is inconsistent. Emojis are also a very opinionated styling. I therefore think it would be great to implement a method for setting a custom symbol in place of the text arrow. For example, simply adding a different arrow for me, maintains that arrow upon rendering.
mdast-util-to-hast/lib/footer.js
line: 53This could look like:
options.footerSymbol = '⤴';
Which would simply replace the arrow symbol in
mdast-util-to-hast/lib/footer.js
Alternatives
Other than manually editing the
mdast-util-to-hast/lib/footer.js
file innode_modules
, I don't think so.