DiffBox issue with special HTML symbols
Closed this issue · 2 comments
barbatus commented
DiffBox has troubles to show correctly special HTML symbols in non HTML files.
For example, if a Git patch file contains a generic type expression (used in a TypeScript file):
let array = new Array<Object>();
It eventually will be shown as
let array = new Array();
where <Object>
is omitted.
Workaround is to escape <
symbol with the <
sequence.
Is any way to fix it?
stubailo commented
Yeah I think you'd want to patch this file:
Basically, you need to do the HTML escape before you call the highlighting code.
Urigo commented
fixed with the latest release