diff options
author | aycabta <aycabta@gmail.com> | 2020-08-04 15:46:39 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-09-18 14:57:57 +0900 |
commit | b5db9b8a314249adee021ba6a426c6a2ebbc6804 (patch) | |
tree | c4d5b28cc29cb2f4dcee33c662783c3d1fa988d1 /lib/rdoc | |
parent | 3b159374a2daa101b419ebf6f4a7fe01bbe9dc55 (diff) |
[ruby/rdoc] Support full filename to make a link for a text file
https://github.com/ruby/rdoc/commit/41db49c485
Diffstat (limited to 'lib/rdoc')
-rw-r--r-- | lib/rdoc/cross_reference.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/store.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/rdoc/cross_reference.rb b/lib/rdoc/cross_reference.rb index 2785852387..99a64cd99a 100644 --- a/lib/rdoc/cross_reference.rb +++ b/lib/rdoc/cross_reference.rb @@ -173,7 +173,7 @@ class RDoc::CrossReference end unless ref # Try a page name - ref = @store.page name if not ref and name =~ /^\w+$/ + ref = @store.page name if not ref and name =~ /^[\w.]+$/ ref = nil if RDoc::Alias === ref # external alias, can't link to it diff --git a/lib/rdoc/store.rb b/lib/rdoc/store.rb index 05d8383c86..5ba671ca1b 100644 --- a/lib/rdoc/store.rb +++ b/lib/rdoc/store.rb @@ -723,7 +723,7 @@ class RDoc::Store def page name @text_files_hash.each_value.find do |file| - file.page_name == name + file.page_name == name or file.base_name == name end end |