Skip to content

Instantly share code, notes, and snippets.

@samuelgoto
Last active July 18, 2022 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelgoto/1836b3757833c7ccd45a843a5da3d49b to your computer and use it in GitHub Desktop.
Save samuelgoto/1836b3757833c7ccd45a843a5da3d49b to your computer and use it in GitHub Desktop.

hello world. what would happen if i included a typogram into a github markdown file? Would github keep its annotation?

+----+
|.   |---> hello world!
+----+

Oh, yes, it does! here is what this turns into:

<pre lang="typogram">
  <code>
+----+
|.   |---&gt; hello world!
+----+
  </code>
</pre>

So, maybe I could write a JS script to search for DOM nodes that look like <pre lang="typogram"> and replace them with SVG renderings?

Unfortunately, github won't allow me to embed scripts into simple markdown renderings, but it does on github pages / jekyl, which I guess it is a starting point?

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