You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/modules/highlight
mrsdizzie 078d2fbd4c
Remove newline when highlighting random chunks of code (#12180)
* Remove newline when highlighting random chunks of code

Somewhere when tokenizing a newline gets added to code formatted by chroma. This breaks the case of 'added-code' inside of an 'added-line' in a diff. Just remove any newline when processing chunks of code since we don't need it.

Fixes #12172

* don't process empty lines

* This is the proper way to fix this by telling chroma not to add the newline in the first place
5 years ago
..
highlight.go Remove newline when highlighting random chunks of code (#12180) 5 years ago