| @@ -3,9 +3,11 @@ module Docs · 2 unmodified lines |
| 3 | class EntriesFilter < Docs::EntriesFilter | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | def get_name | 4 | def get_name |
| 5 | name = super | 5 | name = super |
| 6 | name.gsub!('Element.', '') | | |
| 7 | name.gsub!('Attribute.', '') | 6 | name.gsub!('Attribute.', '') |
| 8 | name.gsub!('Tutorial.', '') | 7 | name.gsub!('Element.', '') |
| | 8 | name.gsub!('Guides.', '') |
| | 9 | name.gsub!('Reference.', '') |
| | 10 | name.gsub!('Tutorials.', '') |
| 9 | name.gsub!('_', '') | 11 | name.gsub!('_', '') |
| 10 | | 12 | |
| 11 | if name.in?(%w(Element Attribute Content\ type)) | 13 | if name.in?(%w(Element Attribute Content\ type)) |
| @@ -16,14 +18,14 @@ module Docs · 4 unmodified lines |
| 16 | end | 18 | end |
| 17 | | 19 | |
| 18 | def get_type | 20 | def get_type |
| 19 | if slug.start_with?('Element') | 21 | if slug.start_with?('Reference/Element') |
| 20 | 'Elements' | 22 | 'Elements' |
| 21 | elsif slug.start_with?('Attribute') | 23 | elsif slug.start_with?('Reference/Attribute') |
| 22 | 'Attributes' | 24 | 'Attributes' |
| 23 | elsif slug.start_with?('Tutorial') | 25 | elsif slug.start_with?('Guides') |
| 24 | 'Tutorial' | 26 | 'Guides' |
| 25 | elsif slug == 'Content_type' | 27 | elsif slug.start_with?('Tutorials') |
| 26 | 'Content types' | 28 | 'Tutorials' |
| 27 | else | 29 | else |
| 28 | 'Miscellaneous' | 30 | 'Miscellaneous' |
| 29 | end | 31 | end |