Skip to content

Commit

Permalink
Make (#methodname) a link
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu authored and aycabta committed Oct 26, 2019
1 parent 5aacb30 commit d70fdee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rdoc/cross_reference.rb
Expand Up @@ -28,7 +28,7 @@ class RDoc::CrossReference
# have been suppressed, since the suppression characters are removed by the
# code that is triggered.

CROSSREF_REGEXP = /(?:^|\s)
CROSSREF_REGEXP = /(?:^|[\s()])
(
(?:
# A::B::C.meth
Expand Down
2 changes: 2 additions & 0 deletions test/rdoc/test_rdoc_markup_attribute_manager.rb
Expand Up @@ -358,6 +358,8 @@ def test_regexp_handling
@am.flow("#fred dogs'"))

assert_equal(["cats' ", crossref("#fred")].flatten, @am.flow("cats' #fred"))

assert_equal(["(", crossref("#fred"), ")"].flatten, @am.flow("(#fred)"))
end

def test_tt_html
Expand Down

0 comments on commit d70fdee

Please sign in to comment.