Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't convert ellipsis in markdown #9905

Merged
merged 7 commits into from
Jan 22, 2020
Merged

Conversation

jolheiser
Copy link
Member

Fixes #9904

Signed-off-by: jolheiser <john.olheiser@gmail.com>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jan 21, 2020
@lafriks lafriks added this to the 1.12.0 milestone Jan 21, 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 Jan 21, 2020
@codecov-io
Copy link

codecov-io commented Jan 21, 2020

Codecov Report

Merging #9905 into master will decrease coverage by 0.01%.
The diff coverage is 23.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9905      +/-   ##
==========================================
- Coverage    42.3%   42.28%   -0.02%     
==========================================
  Files         607      608       +1     
  Lines       79353    79393      +40     
==========================================
+ Hits        33571    33574       +3     
- Misses      41640    41677      +37     
  Partials     4142     4142
Impacted Files Coverage Δ
services/gitdiff/gitdiff.go 66.36% <0%> (ø) ⬆️
services/pull/commit_status.go 5.19% <0%> (-2.97%) ⬇️
routers/repo/pull.go 28.67% <0%> (-0.07%) ⬇️
models/commit_status.go 64.13% <100%> (-2.2%) ⬇️
routers/api/v1/repo/status.go 44.57% <50%> (ø) ⬆️
modules/structs/commit_status.go 54.54% <54.54%> (ø)
services/pull/check.go 56.64% <0%> (+2.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7a4798...d9d1fe8. Read the comment docs.

sapk and others added 2 commits January 21, 2020 12:41
Co-Authored-By: zeripath <art27@cantab.net>
@WGH-
Copy link
Contributor

WGH- commented Jan 21, 2020

Is it the proper fix, though? I mean the bug is not in the ellipsis convertion per se, but rather that ellipsises are converted inside autolinked URLs as well.

Maybe that's the only thing we can do for the time being, but I think this warrants creating an upstream bug as well.

@zeripath
Copy link
Contributor

It's not upstream's fault - it's ours. Really we should run this filter after we've detected all the urls - but we do that outside of the markdown renderer.

What we need to do is do the link detection from within markdown and only run our link detection on html files.

@sapk sapk merged commit 53f9dbf into go-gitea:master Jan 22, 2020
@sapk
Copy link
Member

sapk commented Jan 22, 2020

@jolheiser Please send backport.

@jolheiser jolheiser deleted the smartypants branch January 22, 2020 15:32
jolheiser added a commit to jolheiser/gitea that referenced this pull request Jan 22, 2020
* Don't convert ellipsis

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Formatting

Co-Authored-By: zeripath <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
@techknowlogick techknowlogick added the backport/done All backports for this PR have been created label Jan 22, 2020
zeripath added a commit that referenced this pull request Jan 22, 2020
* Don't convert ellipsis

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Formatting

Co-Authored-By: zeripath <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 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. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Three dots in URLs are converted to HORIZONTAL ELLIPSIS unicode character
10 participants