lib/docbookrx/docbook_visitor.rb
# transfer node type constants from Nokogiri
transfer node type constants from Nokogiri
transfer node type constants from Nokogiri
def visit_screen node
    append_blank_line unless node.parent.name == 'para'
    source_lines = node.text.rstrip.split EOL
    if source_lines.detect {|line| line.match(/^-{4,}/) }
      append_line '[listing]'
      append_line '....'
      append_line node.text.rstrip
      append_line '....'
    else
      append_line '----'
      append_line node.text.rstrip
      append_line '----'
    end
    false
  end
def visit_screen node append_blank_line unless node . parent . name == 'para' source_lines = node . text . rstrip . split EOL if source_lines . detect { | line | line . match ( / ^-{4,} / ) } append_line '[listing]' append_line '....' append_line node . text . rstrip append_line '....' else append_line '----' append_line node . text . rstrip append_line '----' end false end
transfer node type constants from Nokogiri
transfer node type constants from Nokogiri
node
<not_specific>