Unified · Split
| @@ -2,7 +2,10 @@ module Docs · 1 unmodified line | |||
| 2 | class Gnu | 2 | class Gnu |
| 3 | class CleanHtmlFilter < Filter | 3 | class CleanHtmlFilter < Filter |
| 4 | def call | 4 | def call |
| 5 | css('.nav-panel', '.copiable-link').remove | ||
| 5 | heading = at_css('h1, h2, h3, h4, h5') | 6 | heading = at_css('h1, h2, h3, h4, h5') |
| 7 | heading.content = heading.content | ||
| 8 | doc.prepend_child heading.remove | ||
| 6 | heading_level = heading.name[/h(\d)/, 1].to_i | 9 | heading_level = heading.name[/h(\d)/, 1].to_i |
| 7 | 10 | ||
| 8 | css('h2, h3, h4, h5, h6').each do |node| | 11 | css('h2, h3, h4, h5, h6').each do |node| |
| @@ -11,6 +11,7 @@ module Docs · 10 unmodified lines | |||
| 11 | def get_name | 11 | def get_name |
| 12 | name = at_css('h1').content | 12 | name = at_css('h1').content |
| 13 | name.sub! %r{\A([\d\.]*\d)}, '\1.' | 13 | name.sub! %r{\A([\d\.]*\d)}, '\1.' |
| 14 | name.remove! %r{\s*¶} | ||
| 14 | name.split('—').first.strip | 15 | name.split('—').first.strip |
| 15 | end | 16 | end |
| 16 | 17 | ||
| @@ -46,13 +46,23 @@ module Docs · 45 unmodified lines | |||
| 46 | 'Wtrigraphs.html' => 'Invocation.html' | 46 | 'Wtrigraphs.html' => 'Invocation.html' |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | version '14' do | ||
| 50 | self.release = '14.2.0' | ||
| 51 | self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/" | ||
| 52 | end | ||
| 53 | |||
| 54 | version '14 CPP' do | ||
| 55 | self.release = '14.2.0' | ||
| 56 | self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/" | ||
| 57 | end | ||
| 58 | |||
| 49 | version '13' do | 59 | version '13' do |
| 50 | self.release = '13.1.0' | 60 | self.release = '13.3.0' |
| 51 | self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/" | 61 | self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/" |
| 52 | end | 62 | end |
| 53 | 63 | ||
| 54 | version '13 CPP' do | 64 | version '13 CPP' do |
| 55 | self.release = '13.1.0' | 65 | self.release = '13.3.0' |
| 56 | self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/" | 66 | self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/" |
| 57 | end | 67 | end |
| 58 | 68 | ||
| @@ -6,8 +6,13 @@ module Docs · 5 unmodified lines | |||
| 6 | home: 'https://gcc.gnu.org/fortran/' | 6 | home: 'https://gcc.gnu.org/fortran/' |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | version '14' do | ||
| 10 | self.release = '14.2.0' | ||
| 11 | self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/" | ||
| 12 | end | ||
| 13 | |||
| 9 | version '13' do | 14 | version '13' do |
| 10 | self.release = '13.1.0' | 15 | self.release = '13.3.0' |
| 11 | self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/" | 16 | self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/" |
| 12 | end | 17 | end |
| 13 | 18 | ||