summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-16 12:54:10 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-16 12:54:10 +0300
commit31f007f79fda5814902fd8e9be5733ce6611781f (patch)
tree268755225e128c3d71a36fcde66b117d966046b8
parent36b2f2e3c2fe5e34dfa334f27f459dcb3a469cbd (diff)
downloadgitlab-ce-31f007f79fda5814902fd8e9be5733ce6611781f.tar.gz
Fix skipping of some elements in makrdown
-rw-r--r--lib/gitlab/markdown.rb20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb
index 05c118b81a1..92c9327070b 100644
--- a/lib/gitlab/markdown.rb
+++ b/lib/gitlab/markdown.rb
@@ -115,15 +115,17 @@ module Gitlab
suffix = $~[:suffix]
type = TYPES.select{|t| !$~[t].nil?}.first
- next unless type
-
- identifier = $~[type]
-
- # Avoid HTML entities
- if prefix && suffix && prefix[0] == '&' && suffix[-1] == ';'
- match
- elsif ref_link = reference_link(type, identifier)
- "#{prefix}#{ref_link}#{suffix}"
+ if type
+ identifier = $~[type]
+
+ # Avoid HTML entities
+ if prefix && suffix && prefix[0] == '&' && suffix[-1] == ';'
+ match
+ elsif ref_link = reference_link(type, identifier)
+ "#{prefix}#{ref_link}#{suffix}"
+ else
+ match
+ end
else
match
end