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