[BUG] Including the word "chapter" in an admonition block title

324 views
Skip to first unread message

Patrick J Cherry

unread,
Nov 20, 2009, 7:55:41 AM11/20/09
to asci...@googlegroups.com
Hello!

I think I've stumbled across a bit of a bug with asciidoc. It is not
possible to include the words "chapter" or "section" in a title for an
admonition block.

e.g.

---8<-----------------------------------------------------------------
[NOTE]
.Stuff in this area
======================
- Look at my note!
======================
---8<-----------------------------------------------------------------

is OK, but

---8<-----------------------------------------------------------------
[NOTE]
.Stuff in this section
======================
- Look at my note!
======================
---8<-----------------------------------------------------------------

fails on processing with the following output:

---8<-----------------------------------------------------------------
$ asciidoc -d article test.txt
asciidoc: ERROR: test.txt: line 12: only book doctypes can contain level 0 sections
asciidoc: WARNING: test.txt: line 12: missing [NOTE] section
asciidoc: ERROR: test.txt: line 15: section title not permitted in delimited block
asciidoc: ERROR: test.txt: line 13: [blockdef-example] missing closing delimiter
---8<-----------------------------------------------------------------

Is this a known issue? I've attached a copy of the failing document.
I'm using asciidoc 8.5.1.

Thanks!

--
Patrick J Cherry
test.txt

Patrick J Cherry

unread,
Nov 20, 2009, 8:35:32 AM11/20/09
to asci...@googlegroups.com
(apologies for replying to my own post. I think that I've solved this
bug.

I've subsequently worked out that it didn't affect just the workds
"chapter" and "section" but in fact anything that caused the line of "="
to be less than three characters longer than the title line.

So

[NOTE]
.Stuff in this section
=======================
- Look at my note!
=======================

failed, but

[NOTE]
.Stuff in this section
=========================
- Look at my note!
=========================

works fine.

Sorry to have caused any trouble!

--
Patrick J Cherry

Stuart Rackham

unread,
Nov 20, 2009, 2:06:58 PM11/20/09
to asci...@googlegroups.com
Hi Patrick

The explanation for this gotcha is that the block title plus the line of ='s is
seen as a two line document title because the line lengths match (within 2
characters). It would probably make more sense if the block titles took
precedence over section titles.

Cheers, Stuart
Reply all
Reply to author
Forward
0 new messages