summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2021-10-07 02:51:06 -0600
committerGitHub <noreply@github.com>2021-10-07 02:51:06 -0600
commit79424ceca876ae741716b64bd8bda5d514b0de57 (patch)
tree387bcc9e5aa8f6ac9d836ebd797fcf0394be54e6 /lib
parent0bbc3ef717620180fc0f8b1a708cef6147a3a2e2 (diff)
resolves #4151 don't promote level-0 special section at start of document to document title (PR #4152)
Diffstat (limited to 'lib')
-rw-r--r--lib/asciidoctor/parser.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asciidoctor/parser.rb b/lib/asciidoctor/parser.rb
index f54d07f6..628b79dc 100644
--- a/lib/asciidoctor/parser.rb
+++ b/lib/asciidoctor/parser.rb
@@ -123,9 +123,9 @@ class Parser
block_attrs = reader.skip_blank_lines ? (parse_block_metadata_lines reader, document) : {}
doc_attrs = document.attributes
- # special case, block title is not allowed above document title,
+ # special cases, block style or title is not allowed above document title,
# carry attributes over to the document body
- if (implicit_doctitle = is_next_line_doctitle? reader, block_attrs, doc_attrs['leveloffset']) && block_attrs['title']
+ if (implicit_doctitle = is_next_line_doctitle? reader, block_attrs, doc_attrs['leveloffset']) && (block_attrs['title'] || block_attrs['style'])
return document.finalize_header block_attrs, false
end