diff --git a/lib/redcloth.rb b/lib/redcloth.rb index 1228af6e..e1a995da 100644 --- a/lib/redcloth.rb +++ b/lib/redcloth.rb @@ -839,7 +839,7 @@ class RedCloth < String end end - TEXTILE_REFS_RE = /(^ *)\[([^\n]+?)\](#{HYPERLINK})(?=\s|$)/ + TEXTILE_REFS_RE = /(^ *)\[([^\[\n]+?)\](#{HYPERLINK})(?=\s|$)/ MARKDOWN_REFS_RE = /(^ *)\[([^\n]+?)\]:\s+?(?:\s+"((?:[^"]|\\")+)")?(?=\s|$)/m def refs( text )