Login  Register

Adding Words to Title Causes Errors

Posted by Jon Forrest on Dec 04, 2018; 4:47am
URL: https://discuss.asciidoctor.org/Adding-Words-to-Title-Causes-Errors-tp6627.html

Ubuntu 18.10
asciidoctor --version = Asciidoctor 1.5.6.1 [http://asciidoctor.org]
Runtime Environment (ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)

I have the following in a file called jon.asc

Pro Git
=======
[preface]
A B C

Running

bundle exec asciidoctor  jon.asc

produces no errors, as expected. However, changing the first line to

Pro Git Jon

and running the same command produces

asciidoctor: WARNING: jon.asc: line 6: invalid style for paragraph: preface

Of course, there's no line 6 in jon.asc.

This is obviously a contrived example. However, when I run the same command on a full book, which includes
a bunch of chapters, I get an error message, e.g. "asciidoctor: ERROR: book/03-git-branching/sections/basic-branching-and-merging.asc: line 335: only book doctypes can contain level 0 sections"

Why does adding words to the first line cause errors when nothing else changes?

Thanks,
Jon Forrest