| @@ -6,6 +6,8 @@ module Docs · 5 unmodified lines |
| 6 | at_css("#toc a[href='#{File.basename(slug)}']").content | 6 | at_css("#toc a[href='#{File.basename(slug)}']").content |
| 7 | elsif slug.start_with?('reference') | 7 | elsif slug.start_with?('reference') |
| 8 | 'Reference' | 8 | 'Reference' |
| | 9 | elsif slug == 'error-index' |
| | 10 | 'Compiler Errors' |
| 9 | else | 11 | else |
| 10 | name = at_css('h1.fqn .in-band').content.remove(/\A.+\s/) | 12 | name = at_css('h1.fqn .in-band').content.remove(/\A.+\s/) |
| 11 | mod = slug.split('/').first | 13 | mod = slug.split('/').first |
| @@ -21,6 +23,8 @@ module Docs · 9 unmodified lines |
| 21 | 'Guide' | 23 | 'Guide' |
| 22 | elsif slug.start_with?('reference') | 24 | elsif slug.start_with?('reference') |
| 23 | 'Reference' | 25 | 'Reference' |
| | 26 | elsif slug == 'error-index' |
| | 27 | 'Compiler Errors' |
| 24 | else | 28 | else |
| 25 | path = name.split('::') | 29 | path = name.split('::') |
| 26 | heading = at_css('h1.fqn .in-band').content.strip | 30 | heading = at_css('h1.fqn .in-band').content.strip |
| @@ -43,6 +47,10 @@ module Docs · 16 unmodified lines |
| 43 | id = node['href'].remove('#') | 47 | id = node['href'].remove('#') |
| 44 | [name, id] | 48 | [name, id] |
| 45 | end | 49 | end |
| | 50 | elsif slug == 'error-index' |
| | 51 | css('.error-described h2.section-header').map do |node| |
| | 52 | [node.content, node['id']] |
| | 53 | end |
| 46 | else | 54 | else |
| 47 | css('#methods + * + div > .method', '#required-methods + div > .method', '#provided-methods + div > .method').map do |node| | 55 | css('#methods + * + div > .method', '#required-methods + div > .method', '#provided-methods + div > .method').map do |node| |
| 48 | name = node.at_css('.fnname').content | 56 | name = node.at_css('.fnname').content |