diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-04-28 23:46:43 +0900 |
---|---|---|
committer | git <[email protected]> | 2023-04-29 16:55:36 +0000 |
commit | 85a9fd1902e2eba7910aa7490a8f09560dff451f (patch) | |
tree | f3cafd5239c48a7033f67e5fec607865b4a648a6 /lib/rdoc | |
parent | d23964360335ad561f252cb6fe8e90df7ebee90e (diff) |
[ruby/rdoc] Fix polynominal backtracking
Fix https://github.com/ruby/rdoc/pull/995
https://github.com/ruby/rdoc/commit/adfa7db5b9
Diffstat (limited to 'lib/rdoc')
-rw-r--r-- | lib/rdoc/parser/ruby.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb index 0323e4de41..2c8a19f608 100644 --- a/lib/rdoc/parser/ruby.rb +++ b/lib/rdoc/parser/ruby.rb @@ -2134,7 +2134,7 @@ class RDoc::Parser::Ruby < RDoc::Parser if :on_nl == tk[:kind] or (:on_kw == tk[:kind] && 'def' == tk[:text]) then return elsif :on_comment == tk[:kind] or :on_embdoc == tk[:kind] then - return unless tk[:text] =~ /\s*:?([\w-]+):\s*(.*)/ + return unless tk[:text] =~ /:?\b([\w-]+):\s*(.*)/ directive = $1.downcase |