class Asciidoctor::DocBook45::BlockOpenTemplate
Public Instance Methods
open_block(node, id, style, role, reftext, title)
click to toggle source
# File lib/asciidoctor/backends/docbook45.rb, line 383 def open_block(node, id, style, role, reftext, title) case style when 'abstract' if node.parent == node.document && node.document.attr?('doctype', 'book') warn 'asciidoctor: WARNING: abstract block cannot be used in a document without a title when doctype is book. Excluding block content.' '' else %Q(<abstract>#{title && "\n<title>#{title}</title>"} #{content node} </abstract>) end when 'partintro' unless node.document.attr?('doctype', 'book') && node.parent.is_a?(Asciidoctor::Section) && node.level == 0 warn 'asciidoctor: ERROR: partintro block can only be used when doctype is book and it\s a child of a part section. Excluding block content.' '' else %Q(<partintro#{common_attrs id, role, reftext}>#{title && "\n<title>#{title}</title>"} #{content node} </partintro>) end else node.content end end
result(node)
click to toggle source
# File lib/asciidoctor/backends/docbook45.rb, line 379 def result(node) open_block(node, node.id, node.style, node.role, node.reftext, node.title? ? node.title : nil) end
template()
click to toggle source
# File lib/asciidoctor/backends/docbook45.rb, line 408 def template :invoke_result end