Skip to content

Instantly share code, notes, and snippets.

@raiph
Last active July 1, 2022 20:20
Show Gist options
  • Save raiph/bff9a4b268eba46f7925db72069256e6 to your computer and use it in GitHub Desktop.
Save raiph/bff9a4b268eba46f7925db72069256e6 to your computer and use it in GitHub Desktop.
Nice looking (but complicated to code and not accessible for blind) footnoted links for Reddit, SO, GH gists. (View raw to see underlying markdown.)

To future me and any other readers:

  • The Reddit rendering (which you should see if you click the foregoing link) of this gist's underlying markdown hopefully renders the footnotes in the Reddit footnotes bullet below such that they look the same style as seen in the StackOverflow footnotes bullet of the GH gist rendering of this gist. I say "hopefully" in the sense they do look the same using my laptop as I write this in Feb 2022, and in the sense I'm hoping it'll remain that way. But of course things might look different on your system, and any of these platforms can change their rendering at any time.
  • Use this footnote approach if you like, but it's complicated, and, worse, probably horrible for the blind, and, worst of all, the Reddit version feels like it might well be trashed in the future, quite plausibly making footnotes in my Reddit style unclickable, or even effectively unrecoverably destroying them at some point in the future.

  • Reddit footnotes Text being footnoted  ^([1])˒^([2]) has a Unicode thin no break space character immediately before the footnotes (ie between the "d" of "footnoted" and the "^([1])"), and a regular space immediately after them (ie before "h" of "has a Unicode ..."). The footnotes themselves are separated by ˒, which serves as a superscript comma.
  • StackOverflow footnotes (/ CommonMark?) Replacing ^( of above reddit styled footnotes (but not Raku code etc!!) with <sup>, and ) with </sup> yields: "Text being footnoted [1] ...".
  • GH gist footnotes Same as StackOverflow footnotes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment