Skip to content

Commit

Permalink
Docs: Fix matching nested type references in markdown renderer
Browse files Browse the repository at this point in the history
Closes #5293
  • Loading branch information
straight-shoota authored and Martin Verzilli committed Dec 18, 2017
1 parent bec582a commit 88147d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compiler/crystal/tools/doc/markdown_doc_renderer.cr
Expand Up @@ -46,9 +46,9 @@ class Crystal::Doc::MarkdownDocRenderer < Markdown::HTMLRenderer

# Check Type#method(...) or Type or #method(...)
text = text.gsub /\b
((?:\:\:)?[A-Z]\w+(?:\:\:[A-Z]\w+)?(?:\#|\.)(?:\w|\<|\=|\>|\+|\-|\*|\/|\[|\]|\&|\||\?|\!|\^|\~)+(?:\?|\!)?(?:\(.+?\))?)
((?:\:\:)?[A-Z]\w+(?:\:\:[A-Z]\w+)*(?:\#|\.)(?:\w|\<|\=|\>|\+|\-|\*|\/|\[|\]|\&|\||\?|\!|\^|\~)+(?:\?|\!)?(?:\(.+?\))?)
|
((?:\:\:)?[A-Z]\w+(?:\:\:[A-Z]\w+)?)
((?:\:\:)?[A-Z]\w+(?:\:\:[A-Z]\w+)*)
|
((?:\#|\.)(?:\w|\<|\=|\>|\+|\-|\*|\/|\[|\]|\&|\||\?|\!|\^|\~)+(?:\?|\!)?(?:\(.+?\))?)
/x do |match_text, match|
Expand Down

0 comments on commit 88147d0

Please sign in to comment.