gregorias / anki-code-highlighter

Anki plugin for code syntax highlighting.
GNU Affero General Public License v3.0
54 stars 3 forks source link

Pygments highlighting doesn't escape HTML entities #46

Closed gregorias closed 1 year ago

gregorias commented 1 year ago

Bug description Pygments highlighting doesn't escape HTML entities

Reproduction steps

  1. Copy paste the following code into as a field's HTML:
$ for i in {{0..100..2}}
> do
>   echo "Welcome $i times"
> done
Welcome 0 times
Welcome 2 times
Welcome 4 times
...
Welcome 100 times

The highlighter will not correctly translate > int >.

image

Expected behavior

image

Additional context Seems like the bug from https://github.com/gregorias/anki-code-highlighter/issues/45#issuecomment-1455174234 wasn't fixed.

gregorias commented 1 year ago

It seems to be fixed now.