Commit 31f007f79fda5814902fd8e9be5733ce6611781f
1 parent
36b2f2e3
Exists in
master
and in
4 other branches
Fix skipping of some elements in makrdown
Showing
1 changed file
with
11 additions
and
9 deletions
Show diff stats
lib/gitlab/markdown.rb
| ... | ... | @@ -115,15 +115,17 @@ module Gitlab |
| 115 | 115 | suffix = $~[:suffix] |
| 116 | 116 | type = TYPES.select{|t| !$~[t].nil?}.first |
| 117 | 117 | |
| 118 | - next unless type | |
| 119 | - | |
| 120 | - identifier = $~[type] | |
| 121 | - | |
| 122 | - # Avoid HTML entities | |
| 123 | - if prefix && suffix && prefix[0] == '&' && suffix[-1] == ';' | |
| 124 | - match | |
| 125 | - elsif ref_link = reference_link(type, identifier) | |
| 126 | - "#{prefix}#{ref_link}#{suffix}" | |
| 118 | + if type | |
| 119 | + identifier = $~[type] | |
| 120 | + | |
| 121 | + # Avoid HTML entities | |
| 122 | + if prefix && suffix && prefix[0] == '&' && suffix[-1] == ';' | |
| 123 | + match | |
| 124 | + elsif ref_link = reference_link(type, identifier) | |
| 125 | + "#{prefix}#{ref_link}#{suffix}" | |
| 126 | + else | |
| 127 | + match | |
| 128 | + end | |
| 127 | 129 | else |
| 128 | 130 | match |
| 129 | 131 | end | ... | ... |