lib/docbookrx/docbook_visitor.rb
# transfer node type constants from Nokogiri
transfer node type constants from Nokogiri
transfer node type constants from Nokogiri
def after_traverse node, method
    at_root = (node == node.document.root)
    if at_root
      if @requires_index
        append_blank_line
        append_line 'ifdef::backend-docbook[]'
        append_line '[index]'
        append_line '== Index'
        append_line '// Generated automatically by the DocBook toolchain.'
        append_line 'endif::backend-docbook[]'
      end
    else
      method_name = method.to_s
      case method_name
      when "visit_itemizedlist", "visit_orderedlist"
        @list_depth -= 1
      when "visit_table", "visit_informaltable"
        @in_table = false
      when "visit_emphasis", "process_literal"
        @nested_formatting.pop
      end
      @last_added_was_special = false
      case method_name
      when "visit_itemizedlist", "visit_orderedlist", "visit_table",
           "visit_informaltable", "visit_quandaset", "figure"
        @last_added_was_special = true
      end
    end
    unless IGNORED_NAMES.include? node.name
      append_ifdef_end_if_condition(node)
    end
  end
def after_traverse node , method at_root = ( node == node . document . root ) if at_root if @requires_index append_blank_line append_line 'ifdef::backend-docbook[]' append_line '[index]' append_line '== Index' append_line '// Generated automatically by the DocBook toolchain.' append_line 'endif::backend-docbook[]' end else method_name = method . to_s case method_name when "visit_itemizedlist" , "visit_orderedlist" @list_depth -= 1 when "visit_table" , "visit_informaltable" @in_table = false when "visit_emphasis" , "process_literal" @nested_formatting . pop end @last_added_was_special = false case method_name when "visit_itemizedlist" , "visit_orderedlist" , "visit_table" , "visit_informaltable" , "visit_quandaset" , "figure" @last_added_was_special = true end end unless IGNORED_NAMES . include? node . name append_ifdef_end_if_condition ( node ) end end
transfer node type constants from Nokogiri
transfer node type constants from Nokogiri
node
<not_specific>
method
<not_specific>