Skip to content

Fix diff syntax highlighting

Stan Hu requested to merge stanhu/gitlab-ce:fix-diff-highlighting into master

What does this MR do?

This MR fixes a syntax highlighting issue that that manifested itself when a user tried the following:

+aaa
+bbb
 ccc

However, a regression in 0abe98f0 caused the last line to be put on the second to last line:

image

Instead of this:

image

This bug occurred because of some error in the logic of handling new lines in the content. Refactored HTML parser to avoid duplication of newline parsing.

What are the relevant issue numbers?

Closes #2235 (closed)

Merge request reports