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.
forgejo/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>
3 years ago
..
archiver migrate from com.* to alternatives (#14103) 4 years ago
comments Enhance Ghost comment mitigation Settings (#14392) 3 years ago
externalaccount Allow externalID to be UUID (#8551) 5 years ago
gitdiff Fix broken spans in diffs (#14678) 3 years ago
issue label and milestone webhooks on issue/pull creation (#14363) 3 years ago
mailer Add dismiss review feature (#12674) 3 years ago
mirror [API] Add pagination to ListBranches (#14524) 3 years ago
pull Add dismiss review feature (#12674) 3 years ago
release Fix wrong publisher id (#14212) 4 years ago
repository migrate from com.* to alternatives (#14103) 4 years ago
webhook Added option to disable webhooks (#13176) 3 years ago
wiki migrate from com.* to alternatives (#14103) 4 years ago