asciidoc-py / asciidoc-py2

Deprecated python2 implementation of AsciiDoc.py. See asciidoc-py/asciidoc-py for current work.
https://asciidoc.org/
GNU General Public License v2.0
466 stars 128 forks source link

a2x outputs badly formed XML #107

Closed kszafran closed 7 years ago

kszafran commented 7 years ago

When using this asciidoc file as input (truncated to a minimal example):

= This does not work...

[tag]#*# [tag]#*#

I get an error trying to generate a PDF file through the DocBook toolchain:

$ a2x -fpdf buggy.adoc
a2x: ERROR: "xmllint" --nonet --noout --valid "/Users/kszafran/asciidoctor-bug/buggy.xml" returned non-zero exit status 1

If you take look at the intermediary DocBook XML you can see it's not well formed (phrase and emphasis elements are intertwined):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<?asciidoc-toc?>
<?asciidoc-numbered?>

<article lang="en">
<articleinfo>
    <title>This does not work&#8230;</title>
</articleinfo>
<simpara><phrase role="tag"><emphasis role="strong"></phrase> <phrase role="tag"></emphasis></phrase></simpara>
</article>

I'm using a2x 8.6.9.

mojavelinux commented 7 years ago

Since * is a formatting mark, you need to use {asterisk} instead.