| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line |
| 2 | 2 | class Less |
| 3 | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | 4 | def name |
| 5 | | − at_css('h1').content |
| 5 | + at_css('h2').content |
| 6 | 6 | end |
| 7 | 7 | |
| 8 | 8 | def type |
| @@ -16,13 +16,13 @@ module Docs · 7 unmodified lines |
| 16 | 16 | def language_entries |
| 17 | 17 | entries = [] |
| 18 | 18 | |
| 19 | | − css('h1').each do |node| |
| 20 | | − name = node.content |
| 19 | + css('h2').each do |node| |
| 20 | + name = node.content.strip |
| 21 | 21 | name = 'Rulesets' if name == 'Passing Rulesets to Mixins' |
| 22 | 22 | entries << [name, node['id']] unless name == 'Overview' |
| 23 | 23 | end |
| 24 | 24 | |
| 25 | | − css('h2[id^="import-options-"]').each do |node| |
| 25 | + css('h3[id^="import-options-"]').each do |node| |
| 26 | 26 | entries << ["@import #{node.content}", node['id']] |
| 27 | 27 | end |
| 28 | 28 | |
| @@ -33,9 +33,9 @@ module Docs · 4 unmodified lines |
| 33 | 33 | ['@property', 'variables-feature-properties'], |
| 34 | 34 | ['@@var', 'variables-feature-variable-names'], |
| 35 | 35 | [':extend()', 'extend-feature'], |
| 36 | | − [':extend(all)', 'extend-feature-extend-quotallquot'], |
| 37 | | − ['@arguments', 'mixins-parametric-feature-the-codeargumentscode-variable'], |
| 38 | | − ['@rest', 'mixins-parametric-feature-advanced-arguments-and-the-coderestcode-variable'], |
| 36 | + [':extend(all)', 'extend-feature-extend-all-'], |
| 37 | + ['@arguments', 'mixins-parametric-feature-the-arguments-variable'], |
| 38 | + ['@rest', 'mixins-parametric-feature-advanced-arguments-and-the-rest-variable'], |
| 39 | 39 | ['@import', 'import-directives-feature'], |
| 40 | 40 | ['when', 'mixin-guards-feature'], |
| 41 | 41 | ['.loop()', 'loops-feature'], |
| @@ -48,13 +48,11 @@ module Docs · 6 unmodified lines |
| 48 | 48 | entries = [] |
| 49 | 49 | type = nil |
| 50 | 50 | |
| 51 | | − css('.docs-section').each do |section| |
| 52 | | − if title = section.at_css('h1') |
| 53 | | − type = title.content |
| 51 | + css('*').each do |node| |
| 52 | + if node.name == 'h2' |
| 53 | + type = node.content |
| 54 | 54 | type.sub! %r{(.+) Functions}, 'Functions: \1' |
| 55 | | − end |
| 56 | | − |
| 57 | | − section.css('h3').each do |node| |
| 55 | + elsif node.name == 'h4' |
| 58 | 56 | entries << [node.content, node['id'], type] |
| 59 | 57 | end |
| 60 | 58 | end |