Bug in asciidoc?

Skip to first unread message

Hannes Niederhausen

Sep 21, 2009, 5:45:24 AM9/21/09
to asciidoc
Hello every body,

right now I'm writing a handbook for my open source software Onotoa.

I emphazed the name with _Onotoa_, but now I have a problem, when
using emphazing and referring to a chapter at the same time.

Here's a tiny example which shos the problem:


== Chapter 1 ==

Hallo, this is a test. See more on <<_chapter_2>> to see more of the

== Chapter 2 ==

Okay, I lied here is no more information.

Compiling with: asciidoc -d book -b xhtml11 test.txt

I'm using asciidoc 8.4.4 (the version in the ubuntu repository).

BTW: converting to docbook produces the same error.

Best regards

Stuart Rackham

Sep 21, 2009, 7:18:39 AM9/21/09
to asci...@googlegroups.com
It's a bug all right. Constrained quotes can be bounded by white space or
adjoining punctuation so that quotes such as these work:

a='x', ('x'), 'x', ['x'], <'x'>

The last example <'x'> is the problem, for your example to work correctly the <
character has to be disallowed at the left boundary, this would mean that <'x'>
would no longer see the x as quoted. It's an unusual construct and just how much
of a problem it would be I don't know. Unfortunately the alternative
xref:_chapter_2[] suffers from a similar problem.

It's not a small problem because the all the auto-generated permalinks start
with an underscore.

You shouldn't find <> used as angle brackets (chevrons) for punctuation the
U+27E8 and U+27E9 should be used so I don't think that disallowing a quoted
entity inside <> is a problem.

The ``fix'' is to change this line in asciidoc.py (L465):

reo = re.compile(r'(?msu)(^|\W)(\[(?P<attrlist>[^[\]]+?)\])?' \

to this:

reo = re.compile(r'(?msu)(^|[^\w;:])(\[(?P<attrlist>[^[\]]+?)\])?' \

Cheers, Stuart

> Best regards
> Hannes
> >

Hannes Niederhausen

Sep 21, 2009, 7:42:12 AM9/21/09
to asci...@googlegroups.com
That works, thank you.

Onotoa - Simply create your Topic Maps schemas.


Stuart Rackham

Sep 21, 2009, 4:42:45 PM9/21/09
to asci...@googlegroups.com
I've added the fix to the trunk:

Cheers, Stuart
Reply all
Reply to author
0 new messages