def open node
case node.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
%(<abstract>
#{title_tag node}#{resolve_content node}
</abstract>)
end
when 'partintro'
unless node.level == 0 && node.parent.context == :section && node.document.doctype == 'book'
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
%(<partintro#{common_attributes node.id, node.role, node.reftext}>
#{title_tag node}#{resolve_content node}
</partintro>)
end
else
node.content
end
end