Skip to content

Commit

Permalink
[ruby/rdoc] Needs more backslash to match escaping backslashs
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu authored and matzbot committed Dec 6, 2023
1 parent 8105ff9 commit 379f067
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/rdoc/parser/c.rb
Expand Up @@ -944,8 +944,7 @@ def handle_constants(type, var_name, const_name, definition)
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+)/, '')
Expand Down

0 comments on commit 379f067

Please sign in to comment.