Skip to content

Alternative fix for HTML diff entity split#13425

Merged
techknowlogick merged 7 commits into
go-gitea:masterfrom
mrsdizzie:again-diff-fix
Nov 5, 2020
Merged

Alternative fix for HTML diff entity split#13425
techknowlogick merged 7 commits into
go-gitea:masterfrom
mrsdizzie:again-diff-fix

Conversation

@mrsdizzie
Copy link
Copy Markdown
Member

This commit both reverts PR #13357 and uses the exiting implementation alredy used for spans to fix the same issue. That PR duplicates some of logic that is already present elsewhere and still was failing for some cases. This should much be simpler as it uses the existing logic that already works for s being split apart.

Added both the original test case and this new currently not working one as well.

I can't link to a line number in commit but see line 107 of templates/repo/release/list.tmpl here for example of it not working with current code:

https://try.gitea.io/mrsdizzie/gitea-mirror/commit/b687707014b31d0f388d1dfb60c09b5dcd48fc4c

Screen Shot 2020-11-04 at 9 41 36 AM

This commit both reverts PR go-gitea#13357 and uses the exiting implementation alredy used for spans to fix the same issue. That PR duplicates most of logic that is already present elsewhere and still was failing for some cases. This should be simpler as it uses the existing logic that already works for <span>s being split apart.

Added both test cases as well.
@mrsdizzie mrsdizzie requested a review from zeripath November 4, 2020 14:44
@techknowlogick techknowlogick added this to the 1.14.0 milestone Nov 4, 2020
Comment thread services/gitdiff/gitdiff.go Outdated
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 4, 2020
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 4, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 4, 2020
@techknowlogick
Copy link
Copy Markdown
Member

🚀

@techknowlogick techknowlogick merged commit d7e0983 into go-gitea:master Nov 5, 2020
mrsdizzie added a commit to mrsdizzie/gitea that referenced this pull request Nov 5, 2020
* Alternative fix for HTML diff entity split

This commit both reverts PR go-gitea#13357 and uses the exiting implementation alredy used for spans to fix the same issue. That PR duplicates most of logic that is already present elsewhere and still was failing for some cases. This should be simpler as it uses the existing logic that already works for <span>s being split apart.

Added both test cases as well.

* Update gitdiff_test.go

* fmt

* entity can have uppercase letter, also add detailed comment per @zeripath
techknowlogick pushed a commit that referenced this pull request Nov 5, 2020
* Alternative fix for HTML diff entity split

This commit both reverts PR #13357 and uses the exiting implementation alredy used for spans to fix the same issue. That PR duplicates most of logic that is already present elsewhere and still was failing for some cases. This should be simpler as it uses the existing logic that already works for <span>s being split apart.

Added both test cases as well.

* Update gitdiff_test.go

* fmt

* entity can have uppercase letter, also add detailed comment per @zeripath
@techknowlogick techknowlogick added the backport/done All backports for this PR have been created label Nov 5, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants