[ruby/rdoc] Needs more backslash to match escaping backslashs

https://github.com/ruby/rdoc/commit/1904e9076d
This commit is contained in:
Nobuyoshi Nakada 2023-12-06 17:37:38 +09:00 committed by git
parent 8105ff9ac4
commit 379f06797d

View File

@ -944,8 +944,7 @@ class RDoc::Parser::C < RDoc::Parser
if new_definition.empty? then # Default to literal C definition
new_definition = definition
else
new_definition = new_definition.gsub("\:", ":")
new_definition = new_definition.gsub("\\", '\\')
new_definition = new_definition.gsub(/\\([\\:])/, '\1')
end
new_definition.sub!(/\A(\s+)/, '')