Method: IsoDoc::HtmlFunction::Html#sourcecode_parse
- Defined in:
- lib/isodoc/html_function/html.rb
#sourcecode_parse(node, out) ⇒ Object
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/isodoc/html_function/html.rb', line 76 def sourcecode_parse(node, out) name = node.at(ns("./name")) tag = node.at(ns(".//sourcecode | .//table")) ? "div" : "pre" attr = sourcecode_attrs(node).merge(class: "sourcecode") out.send tag, **attr do |div| sourcecode_parse1(node, div) end annotation_parse(node, out) sourcecode_name_parse(node, out, name) end |