meteor/tutorial-tools

DiffBox issue with special HTML symbols

Closed this issue · 2 comments

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 &lt; sequence.

Is any way to fix it?

Yeah I think you'd want to patch this file:

const fileSections = Template.instance().fileSections;

Basically, you need to do the HTML escape before you call the highlighting code.

Urigo commented

fixed with the latest release