mirror of https://github.com/go-gitea/gitea.git
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.
* 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. |
6 years ago | |
---|---|---|
.. | ||
csv | 7 years ago | |
external | 6 years ago | |
markdown | 6 years ago | |
orgmode | 6 years ago | |
html.go | 6 years ago | |
html_internal_test.go | 6 years ago | |
html_test.go | 6 years ago | |
markup.go | 6 years ago | |
markup_test.go | 6 years ago | |
sanitizer.go | 8 years ago | |
sanitizer_test.go | 8 years ago |