def open node
if (style = node.style) == 'abstract'
if node.parent == node.document && node.document.doctype == 'book'
warn 'asciidoctor: WARNING: abstract block cannot be used in a document without a title when doctype is book. Excluding block content.'
''
else
id_attr = node.id ? %( id="#{node.id}") : nil
title_el = node.title? ? %(<div class="title">
%(<div#{id_attr} class="quoteblock abstract#{(role = node.role) && " #{role}"}">
#{title_el}<blockquote>
#{node.content}
</blockquote>
</div>)
end
elsif style == 'partintro' && (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 book part. Excluding block content.'
''
else
id_attr = node.id ? %( id="#{node.id}") : nil
title_el = node.title? ? %(<div class="title">
%(<div#{id_attr} class="openblock#{style && style != 'open' ? " #{style}" : ''}#{(role = node.role) && " #{role}"}">
#{title_el}<div class="content">
#{node.content}
</div>
</div>)
end
end