As surfaced in #200, we were stripping away the lang attribute in the resulting <pre> blocks.
While GitHub's UI may add more tags/behaviors based on their syntax highlighting rendering engine, at the very least we can try to preserve the lang attribute after we run our pygments syntax highlighter.
This change doesn't conform 100% to the GFM output on GitHub, as they apply another form of syntax highlighting to the HTML that removes the lang attribute from known languages after being highlighted. I don't know yet which process they use for that.
As surfaced in #200, we were stripping away the
lang
attribute in the resulting<pre>
blocks.While GitHub's UI may add more tags/behaviors based on their syntax highlighting rendering engine, at the very least we can try to preserve the
lang
attribute after we run our pygments syntax highlighter.This change doesn't conform 100% to the GFM output on GitHub, as they apply another form of syntax highlighting to the HTML that removes the
lang
attribute from known languages after being highlighted. I don't know yet which process they use for that.Resolves #200
Signed-off-by: Mike Fiedler miketheman@gmail.com