Showing the changes to lib/docs/filters/cpp (1 of 34 files). Show all
Unified · Split
| @@ -10,10 +10,10 @@ module Docs · 9 unmodified lines | ||
| 10 | 10 | |
| 11 | 11 | def get_name |
| 12 | 12 | name = at_css('#firstHeading').content.strip |
| 13 | − name.sub! 'C++ concepts: ', '' | |
| 14 | − name.sub! 'C++ keywords: ', '' | |
| 15 | − name.sub! 'C++ ', '' | |
| 16 | − name.sub! %r{\s\(.+\)}, '' | |
| 13 | + name.remove! 'C++ concepts: ' | |
| 14 | + name.remove! 'C++ keywords: ' | |
| 15 | + name.remove! 'C++ ' | |
| 16 | + name.remove! %r{\s\(.+\)} | |
| 17 | 17 | name.sub! %r{\AStandard library header <(.+)>\z}, '\1' |
| 18 | 18 | name = name.split(',').first |
| 19 | 19 | REPLACE_NAMES[name] || name |
| @@ -24,9 +24,9 @@ module Docs · 4 unmodified lines | ||
| 24 | 24 | 'Keywords' |
| 25 | 25 | elsif type = at_css('.t-navbar > div:nth-child(4) > :first-child').try(:content) |
| 26 | 26 | type.strip! |
| 27 | − type.sub! ' library', '' | |
| 28 | − type.sub! ' utilities', '' | |
| 29 | − type.sub! 'C++ ', '' | |
| 27 | + type.remove! ' library' | |
| 28 | + type.remove! ' utilities' | |
| 29 | + type.remove! 'C++ ' | |
| 30 | 30 | type.capitalize! |
| 31 | 31 | type |
| 32 | 32 | end |
| @@ -34,7 +34,7 @@ module Docs · 1 unmodified line | ||
| 34 | 34 | |
| 35 | 35 | def additional_entries |
| 36 | 36 | return [] unless include_default_entry? |
| 37 | − names = at_css('#firstHeading').content.gsub(%r{\(.+?\)}, '').split(',')[1..-1] | |
| 37 | + names = at_css('#firstHeading').content.remove(%r{\(.+?\)}).split(',')[1..-1] | |
| 38 | 38 | names.each(&:strip!).reject! do |name| |
| 39 | 39 | name.size <= 2 || name == '...' || name =~ /\A[<>]/ || name.start_with?('operator') |
| 40 | 40 | end |