diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-12-08 23:48:12 +0900 |
---|---|---|
committer | git <[email protected]> | 2022-11-27 16:35:07 +0000 |
commit | 1b67c58f41a9387d762afffa09c27ced8245c0f6 (patch) | |
tree | 806f107a7871358ba9469633def5d07e8d2c5169 /lib/rdoc/parser/c.rb | |
parent | d055c44b0cfeeed2d02f8899200863d69758abc1 (diff) |
[ruby/rdoc] Pull up handle_tab_width to RDoc::Parser
To share with the duplicate code in RDoc::Parser::Ruby#initialize.
https://github.com/ruby/rdoc/commit/27829ac119
Diffstat (limited to 'lib/rdoc/parser/c.rb')
-rw-r--r-- | lib/rdoc/parser/c.rb | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/rdoc/parser/c.rb b/lib/rdoc/parser/c.rb index a03e4663e4..5695bf1acb 100644 --- a/lib/rdoc/parser/c.rb +++ b/lib/rdoc/parser/c.rb @@ -1058,23 +1058,6 @@ class RDoc::Parser::C < RDoc::Parser end ## - # Normalizes tabs in +body+ - - def handle_tab_width(body) - if /\t/ =~ body - tab_width = @options.tab_width - body.split(/\n/).map do |line| - 1 while line.gsub!(/\t+/) do - ' ' * (tab_width * $&.length - $`.length % tab_width) - end && $~ - line - end.join "\n" - else - body - end - end - - ## # Loads the variable map with the given +name+ from the RDoc::Store, if # present. |