diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-04-29 18:45:29 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-04-30 16:35:27 -0400 |
commit | cd3c24a8f3441c249fb73b0a7d7bf412485438de (patch) | |
tree | 4eea08852ee61b373fd6269efe37b3f458e49eac /lib | |
parent | f4fac3ac878a32d60e9dcc8dbe3c3c1da9e4a78d (diff) | |
download | gitlab-ce-cd3c24a8f3441c249fb73b0a7d7bf412485438de.tar.gz |
Autolink short URLs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/markdown/autolink_filter.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/markdown/autolink_filter.rb b/lib/gitlab/markdown/autolink_filter.rb index 9889d6643ab..f0b68bab825 100644 --- a/lib/gitlab/markdown/autolink_filter.rb +++ b/lib/gitlab/markdown/autolink_filter.rb @@ -52,7 +52,10 @@ module Gitlab # NOTE: We don't parse email links because it will erroneously match # external Commit and CommitRange references. - rinku = Rinku.auto_link(html, :urls, options, IGNORE_PARENTS.to_a) + # + # The final argument tells Rinku to link short URLs that don't include a + # period (e.g., http://localhost:3000/) + rinku = Rinku.auto_link(html, :urls, options, IGNORE_PARENTS.to_a, 1) # Rinku returns a String, so parse it back to a Nokogiri::XML::Document # for further processing. |