|
|
@ -3,7 +3,7 @@ module Docs
|
|
|
|
class EntriesFilter < Docs::EntriesFilter
|
|
|
|
class EntriesFilter < Docs::EntriesFilter
|
|
|
|
def get_name
|
|
|
|
def get_name
|
|
|
|
# remove numbers at the beginnig
|
|
|
|
# remove numbers at the beginnig
|
|
|
|
name = at_css('h2', 'h3', 'h4', 'h5', 'h6').content.slice(/[[:alpha:]]...*/)
|
|
|
|
name = at_css('.chapter', '.section', '.subsection', '.subsubsection', '.appendix').content.slice(/[[:alpha:]]...*/)
|
|
|
|
|
|
|
|
|
|
|
|
# remove 'Appendix' word
|
|
|
|
# remove 'Appendix' word
|
|
|
|
name = name.sub(/Appendix.{2}/, '') if name.include?('Appendix')
|
|
|
|
name = name.sub(/Appendix.{2}/, '') if name.include?('Appendix')
|
|
|
@ -28,18 +28,20 @@ module Docs
|
|
|
|
def additional_entries
|
|
|
|
def additional_entries
|
|
|
|
entries = []
|
|
|
|
entries = []
|
|
|
|
|
|
|
|
|
|
|
|
css('.defun').each do |node|
|
|
|
|
css('dl > dt').each do |node|
|
|
|
|
entry_type = 'Builtin Functions' if node.content.include?('Function')
|
|
|
|
if !(node.parent.attribute('compact'))
|
|
|
|
entry_type = 'Builtin Macros' if node.content.include?('Macro')
|
|
|
|
entry_type = 'Builtin Functions' if node.content.include?('Function')
|
|
|
|
entry_type = 'Builtin Variables' if node.content.include?('Variable')
|
|
|
|
entry_type = 'Builtin Macros' if node.content.include?('Macro')
|
|
|
|
entry_type = 'Builtin User Options' if node.content.include?('User Option')
|
|
|
|
entry_type = 'Builtin Variables' if node.content.include?('Variable')
|
|
|
|
entry_type = 'Builtin Special Forms' if node.content.include?('Special Form')
|
|
|
|
entry_type = 'Builtin User Options' if node.content.include?('User Option')
|
|
|
|
entry_type = 'Builtin Commands' if node.content.include?('Command')
|
|
|
|
entry_type = 'Builtin Special Forms' if node.content.include?('Special Form')
|
|
|
|
entry_type = 'Builtin Constants' if node.content.include?('Constant')
|
|
|
|
entry_type = 'Builtin Commands' if node.content.include?('Command')
|
|
|
|
|
|
|
|
entry_type = 'Builtin Constants' if node.content.include?('Constant')
|
|
|
|
entry_name = node.first_element_child.content
|
|
|
|
|
|
|
|
entry_path = slug + '#' + entry_name
|
|
|
|
entry_name = node.at_css('strong').content
|
|
|
|
entries << [entry_name, entry_path.downcase, entry_type]
|
|
|
|
entry_path = slug + '#' + entry_name
|
|
|
|
|
|
|
|
entries << [entry_name, entry_path.downcase, entry_type]
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
entries
|
|
|
|
entries
|
|
|
|