forgejo/modules/markup
mrsdizzie f2de5dc8c8 Replace linkRegex with xurls library (#6261)
* Replace linkRegex with xurls library

Rather than maintaining a complicated regex to match URLs for
autolinking, gitea can use this existing go library that takes care of
the matching with very little code change to gitea itself. After
spending a while trying to find the perfect regex for all cases this library
still works better as it is more flexible than a single regex ever will be.

This will also fix the following issues: #5844 #3095 #3381

This passes all our current tests and I've added new ones mentioned in
those issues as well.

* Use xurls.StrictMatchingScheme instead of xurls.Strict

This is much faster and we only care about https? links to preserve
existing behavior.
2019-03-07 15:12:01 -05:00
..
csv Add csv file render support defaultly (#4105) 2018-07-21 00:08:15 +03:00
external support envs on external render commands (#5278) 2018-11-20 17:11:21 -05:00
markdown Allow markdown files to read from the LFS (#5787) 2019-02-12 15:09:43 +00:00
orgmode Recover panic in orgmode.Render if bad orgfile (#4982) (#5903) 2019-01-30 17:17:43 -05:00
html.go Replace linkRegex with xurls library (#6261) 2019-03-07 15:12:01 -05:00
html_internal_test.go Rework special link parsing in the post-processing of markup (#3354) 2018-02-27 09:09:18 +02:00
html_test.go Replace linkRegex with xurls library (#6261) 2019-03-07 15:12:01 -05:00
markup.go Prioritize "readme.md" (#5691) 2019-01-14 14:15:06 -05:00
markup_test.go Prioritize "readme.md" (#5691) 2019-01-14 14:15:06 -05:00
sanitizer.go Restructure markup & markdown to prepare for multiple markup language… (#2411) 2017-09-16 20:17:57 +03:00
sanitizer_test.go Restructure markup & markdown to prepare for multiple markup language… (#2411) 2017-09-16 20:17:57 +03:00