kramdown
kramdown copied to clipboard
HTML entities in hyperlink text
I'm using kramdown as the default markdown engine in jekyll. Normally it renders entities correctly, even obscure ones like the capital Greek digamma (Ϝ which in some fonts looks vaguely like a Roman capital F). However, when the Ϝ is part of a link, it does not.
Example input: spirit of ϜΤΦ HTML output: spirit of ϜΤΦ
Note here that it has output the Τ and Φ entities as characters, but has escaped the ampersand in Ϝ causing it not to render.
Live example on the web here, near the bottom of the page.
Is jekyll perhaps using an older version by default?
The reason for this is that the Gammad
entity is not recognized by kramdown. I will fix this for the next release.
In the meantime you can do the following:
require 'kramdown/utils'
Kramdown::Utils::Entities::ENTITY_TABLE << [988, 'Gammad']
This adds the entity to the table where kramdown looks it up.
Thanks; that makes sense. Maybe pick up all the legal HTML entities, if any others are missing?