Closed
Description
Description
Diff lines are passed individually line-by-line to chroma, which its a massive source of highlighting bugs because the highlighter needs to see the whole file to highlight correctly. We should instead:
- Highlight both the old and new files individually, store the resulting HTML in Maps of (lineText, lineHTML).
- For each content line in the diff, look into the maps and if there is an exact match, replace the line with the highlighted HTML line.
This assumes chroma does not output HTML tags that span multiple lines, but I think this may already be the case.