Skip to content
Snippets Groups Projects
Commit 50f707e2 authored by Robert Speicher's avatar Robert Speicher
Browse files

Update Autolink SCHEME_PATTERN

parent 9ec8a5f7
No related branches found
No related tags found
1 merge request!584More HTML::Pipeline filters
Loading
Loading
@@ -25,7 +25,9 @@ module Gitlab
# The negative lookbehind ensures that users can paste a URL followed by a
# period or comma for punctuation without those characters being included
# in the generated link.
SCHEME_PATTERN = %r{([a-z][a-z0-9_\+\.\-]+:\/\/[^\s]+)(?<!,|\.)}
#
# Rubular: http://rubular.com/r/cxjPyZc7Sb
SCHEME_PATTERN = %r{([a-z][a-z0-9\+\.-]+://\S+)(?<!,|\.)}
 
# Text matching SCHEME_PATTERN inside these elements will not be linked
IGNORE_PARENTS = %w(a code kbd pre script style).to_set
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment