Open DivineDominion opened 5 years ago
The culprit is Parsedown::element
. It processed the footnote text's HTML and escaped it in
// snip
if (isset($Element['text']))
{
$markup .= '>';
if (!isset($Element['nonNestables']))
{
$Element['nonNestables'] = array();
}
if (isset($Element['handler']))
{
$markup .= $this->{$Element['handler']}($Element['text'], $Element['nonNestables']);
}
else
{
$markup .= self::escape($Element['text'], true);
}
$markup .= '</'.$Element['name'].'>';
}
// snip
The escaping can be circumvented when you specify "handler" => "text"
. I don't know if that breaks different things, but I'll open a PR for this change :)
Hi, have you ask the author of the library ? https://github.com/erusev/parsedown-extra Maybe we need to update the library to a newer version.
Could be -- the upstream library looks totally different in some places, so I'm not even sure it's compatible. It build the $Element
in a different way -- And I'm too new to the bludit pipeline to test this reasonably quick. At the moment, I'm only at the level of hacking together stuff that kinda works :)
I'd suggest checking it out as a submodule (but then the plugin could break when the lib goes away, and be hard to download), or reference the exact commit of the external dependency for diffing. Like, I don't even know if this file was modifies in this repo, or if it's the vanilla checkout from yesteryear.
Footnotes are parsed, but HTML escaped at the moment. Will investigate how to fix this tomorrow.
Example
Example input:
Example output: