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

uuids not rendered correctly #6149

Closed
2 of 7 tasks
femaref opened this issue Feb 21, 2019 · 0 comments · Fixed by #6522
Closed
2 of 7 tasks

uuids not rendered correctly #6149

femaref opened this issue Feb 21, 2019 · 0 comments · Fixed by #6522
Labels
Milestone

Comments

@femaref
Copy link

femaref commented Feb 21, 2019

Description

uuids are not rendered correctly, they are partly interpreted as commit hashes and truncated.

Screenshots

@lunny lunny added the type/bug label Feb 23, 2019
mrsdizzie added a commit to mrsdizzie/gitea that referenced this issue Apr 5, 2019
Currently autolinks use \W for boundary detection which creates many
situations of inserting links into places they don't belong (paths,
URLs, UUIDs, etc...)

This fixes that by replacing \W and only allowing these matches to touch
an open paren or bracket (matching what seems to be Github behavior) in
addition to whitespace and start of line. Similar for ending boundary as
well.

Fixes go-gitea#6149
(and probably others)
zeripath pushed a commit that referenced this issue Apr 7, 2019
* Use stricter boundaries for auto-link detection

Currently autolinks use \W for boundary detection which creates many
situations of inserting links into places they don't belong (paths,
URLs, UUIDs, etc...)

This fixes that by replacing \W and only allowing these matches to touch
an open paren or bracket (matching what seems to be Github behavior) in
addition to whitespace and start of line. Similar for ending boundary as
well.

Fixes #6149
(and probably others)

* Update test

Replace incorrect test with a value that is a valid username, based on:

"Username should contain only alphanumeric, dash ('-'), underscore ('_')
and dot ('.') characters."

* Also allow for period at the end

Matching Github behavior

* Fix email regex to work properly with specificed boundaries

Create a specific capture group for email address and then use
FindStringSubmatchIndex to allow for non-matching patterns as
boundaries.

* Add Tests

Add tests for new behavior -- including tests for email addresses which
were absent before.
@lafriks lafriks added this to the 1.9.0 milestone Apr 8, 2019
@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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants