gitea/services
zeripath beb2058186
Fix broken spans in diffs (#14678)
Gitea runs diff on highlighted code fragment for each line in order to provide
code highlight diffs. Unfortunately this diff algorithm is not aware that span tags
and entities are atomic and cannot be split.

The current fixup code makes some attempt to fix these broken tags however, it cannot
handle situations where a tag is split over multiple blocks.

This PR provides a more algorithmic fixup mechanism whereby spans and entities are
completely coalesced into their respective blocks.

This may result in a incompletely reduced diff but - it will definitely prevent the
broken entities and spans that are currently possible.

As a result of this fixup several inconsistencies were discovered in our testcases
and these were also fixed.

Fix #14231

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-02-14 15:51:00 +01:00
..
archiver
comments Enhance Ghost comment mitigation Settings (#14392) 2021-01-21 21:56:19 -05:00
externalaccount
gitdiff Fix broken spans in diffs (#14678) 2021-02-14 15:51:00 +01:00
issue label and milestone webhooks on issue/pull creation (#14363) 2021-01-17 16:15:57 +02:00
mailer Add dismiss review feature (#12674) 2021-02-11 18:32:25 +01:00
mirror [API] Add pagination to ListBranches (#14524) 2021-02-03 20:06:13 +01:00
pull Add dismiss review feature (#12674) 2021-02-11 18:32:25 +01:00
release Fix wrong publisher id (#14212) 2021-01-01 16:03:31 -05:00
repository
webhook Added option to disable webhooks (#13176) 2021-02-11 12:34:34 -05:00
wiki