Skip to content

Commit e28961f

Browse files
committed
Fix failing test from #269
This also addresses #262 by defaulting to the file extension's parser when the parser is unknown and allows RDoc to fall back to using the :markup: directive as a class comment directive in addition of a special file handling directive. Fixes #262
1 parent 6794c6c commit e28961f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/rdoc/parser.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,11 @@ def self.use_markup content
268268

269269
markup = Regexp.escape markup
270270

271-
RDoc::Parser.parsers.find do |_, parser|
271+
_, parser = RDoc::Parser.parsers.find do |_, parser|
272272
/^#{markup}$/i =~ parser.name.sub(/.*:/, '')
273-
end.last
273+
end
274+
275+
parser
274276
end
275277

276278
##

0 commit comments

Comments
 (0)