Unified · Split
| @@ -7,34 +7,33 @@ module Docs · 6 unmodified lines | ||
| 7 | 7 | title = get_title() |
| 8 | 8 | downtitle = title.downcase |
| 9 | 9 | name = get_name |
| 10 | + | |
| 11 | + # Remove Empty pages. | |
| 10 | 12 | if content.include?('TODO: write this dox page!') || |
| 11 | 13 | content.blank? || content.empty? |
| 12 | 14 | return nil |
| 13 | 15 | end |
| 16 | + | |
| 14 | 17 | if slug.include?('unsupported') |
| 15 | 18 | return 'Unsupported' |
| 16 | − elsif title.end_with?('module') | |
| 17 | − return name | |
| 18 | − elsif not group.nil? and not group.children[-1].nil? and group.children[-1].content != 'Reference' | |
| 19 | − if group.children[-1].content.end_with?('module') || group.content.include?('Reference') | |
| 20 | − return group.children[-1].content | |
| 21 | − else | |
| 22 | − return 'Chapter: ' + group.children[-1].content | |
| 23 | − end | |
| 24 | 19 | elsif slug.start_with?('Topic') || downtitle.end_with?("topics") |
| 25 | − return 'Topics' | |
| 26 | − elsif downtitle.end_with?("class template reference") || downtitle.end_with?("class reference") || downtitle.end_with?("struct reference") | |
| 20 | + return 'Topics' | |
| 21 | + elsif downtitle.end_with?("class template reference") || downtitle.end_with?("class reference") | |
| 27 | 22 | return 'Classes' |
| 23 | + elsif downtitle.end_with?("struct reference") | |
| 24 | + return 'Structs' | |
| 28 | 25 | elsif downtitle.end_with?("typedefs") |
| 29 | 26 | return 'Typedefs' |
| 30 | 27 | elsif downtitle.end_with?("namespace reference") |
| 31 | − return 'Namespaces' | |
| 32 | − elsif name.match(/^Eigen::.*::/) | |
| 33 | − return name.gsub(/^Eigen::/, '').gsub(/::.*/, '') | |
| 34 | − elsif not group.nil? and not group.children[0].nil? | |
| 35 | − return 'Chapter: ' + group.children[0].content | |
| 36 | − # elsif slug.downcase.include?('tutorial') | |
| 37 | − # return nil | |
| 28 | + return 'Namespaces' | |
| 29 | + elsif not group.nil? and group.content.include?('Reference') and (downtitle.end_with?("module") || downtitle.end_with?("modules")) | |
| 30 | + return "Modules" | |
| 31 | + elsif not group.nil? | |
| 32 | + if group.children.length > 0 | |
| 33 | + return 'Chapter: ' + group.children[-1].content | |
| 34 | + else | |
| 35 | + return 'Chapter: ' + group.content | |
| 36 | + end | |
| 38 | 37 | else |
| 39 | 38 | return 'Eigen' |
| 40 | 39 | end |
| @@ -67,11 +66,13 @@ module Docs · 26 unmodified lines | ||
| 67 | 66 | doxygen_type = table.at_css("tr.heading").text.strip |
| 68 | 67 | case doxygen_type |
| 69 | 68 | when "Functions" |
| 70 | − type = name == 'Eigen' ? "Functions" : nil | |
| 69 | + type = "Functions" | |
| 71 | 70 | when "Public Member Functions", "Static Public Member Functions" |
| 72 | 71 | type = nil |
| 73 | − when "Classes", "Typedefs" | |
| 72 | + when "Classes" | |
| 74 | 73 | type = "Classes" |
| 74 | + when "Typedefs" | |
| 75 | + type = "Typedefs" | |
| 75 | 76 | when "Variables" |
| 76 | 77 | type = "Variables" |
| 77 | 78 | else |
| @@ -88,12 +89,17 @@ module Docs · 10 unmodified lines | ||
| 88 | 89 | end |
| 89 | 90 | |
| 90 | 91 | href = node.at_css("a").attr('href') |
| 91 | − if href.index("#").nil? then | |
| 92 | − href += "#" | |
| 93 | − end | |
| 94 | − if slug.include?('unsupported') and not href.include?('unsupported') | |
| 92 | + | |
| 93 | + if not href.include?("#") and (name == 'Eigen' || type = "Classes") then | |
| 95 | 94 | next |
| 96 | 95 | end |
| 96 | + if slug.include?('unsupported') | |
| 97 | + if not (href.include?('unsupported') || href.include?('#')) | |
| 98 | + next | |
| 99 | + elsif href.include?('#') and not href.include?('unsupported') | |
| 100 | + href = 'unsupported/' + href | |
| 101 | + end | |
| 102 | + end | |
| 97 | 103 | |
| 98 | 104 | content = node.content |
| 99 | 105 | if doxygen_type == "Typedefs" |