diff options
Diffstat (limited to 'lib/gitlab/utils/markdown.rb')
-rw-r--r-- | lib/gitlab/utils/markdown.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/utils/markdown.rb b/lib/gitlab/utils/markdown.rb index 82c4a0e3b23..e783ac785cc 100644 --- a/lib/gitlab/utils/markdown.rb +++ b/lib/gitlab/utils/markdown.rb @@ -4,11 +4,13 @@ module Gitlab module Utils module Markdown PUNCTUATION_REGEXP = /[^\p{Word}\- ]/u.freeze + PRODUCT_SUFFIX = /\s*\**\((core|starter|premium|ultimate)(\s+only)?\)\**/.freeze def string_to_anchor(string) string .strip .downcase + .gsub(PRODUCT_SUFFIX, '') .gsub(PUNCTUATION_REGEXP, '') # remove punctuation .tr(' ', '-') # replace spaces with dash .squeeze('-') # replace multiple dashes with one |