History

Restructuring entries, duplicated items removed.

xjkdev committed 4 years ago

Commit b4a14911 parent 44ae69e1 file · +29 −23Browse files

Unified · Split

lib/docs/filters/eigen3/entries.rb+29−23
@@ -7,34 +7,33 @@ module Docs · 6 unmodified lines
77 title = get_title()
88 downtitle = title.downcase
99 name = get_name
10+
11+ # Remove Empty pages.
1012 if content.include?('TODO: write this dox page!') ||
1113 content.blank? || content.empty?
1214 return nil
1315 end
16+
1417 if slug.include?('unsupported')
1518 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
2419 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")
2722 return 'Classes'
23+ elsif downtitle.end_with?("struct reference")
24+ return 'Structs'
2825 elsif downtitle.end_with?("typedefs")
2926 return 'Typedefs'
3027 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
3837 else
3938 return 'Eigen'
4039 end
@@ -67,11 +66,13 @@ module Docs · 26 unmodified lines
6766 doxygen_type = table.at_css("tr.heading").text.strip
6867 case doxygen_type
6968 when "Functions"
70− type = name == 'Eigen' ? "Functions" : nil
69+ type = "Functions"
7170 when "Public Member Functions", "Static Public Member Functions"
7271 type = nil
73− when "Classes", "Typedefs"
72+ when "Classes"
7473 type = "Classes"
74+ when "Typedefs"
75+ type = "Typedefs"
7576 when "Variables"
7677 type = "Variables"
7778 else
@@ -88,12 +89,17 @@ module Docs · 10 unmodified lines
8889 end
8990
9091 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
9594 next
9695 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
97103
98104 content = node.content
99105 if doxygen_type == "Typedefs"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t