ruby-changes:58451
From: Nobuyoshi <ko1@a...>
Date: Sat, 26 Oct 2019 15:49:20 +0900 (JST)
Subject: [ruby-changes:58451] d70fdeedf0 (master): Make `(#methodname)` a link
https://git.ruby-lang.org/ruby.git/commit/?id=d70fdeedf0 From d70fdeedf0a2fc942d91b82f564b78a54ff48d7c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 25 Oct 2019 15:03:18 +0900 Subject: Make `(#methodname)` a link diff --git a/lib/rdoc/cross_reference.rb b/lib/rdoc/cross_reference.rb index 7b13748..76a4dca 100644 --- a/lib/rdoc/cross_reference.rb +++ b/lib/rdoc/cross_reference.rb @@ -28,7 +28,7 @@ class RDoc::CrossReference https://github.com/ruby/ruby/blob/trunk/lib/rdoc/cross_reference.rb#L28 # 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 diff --git a/test/rdoc/test_rdoc_markup_attribute_manager.rb b/test/rdoc/test_rdoc_markup_attribute_manager.rb index 024dcc1..a180666 100644 --- a/test/rdoc/test_rdoc_markup_attribute_manager.rb +++ b/test/rdoc/test_rdoc_markup_attribute_manager.rb @@ -358,6 +358,8 @@ class TestRDocMarkupAttributeManager < RDoc::TestCase https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_markup_attribute_manager.rb#L358 @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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/