asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.88k stars 295 forks source link

pdf creation results in exception #538

Closed schrumpelnase closed 1 year ago

schrumpelnase commented 2 years ago

When trying to create a pdf document of the following short example, pdf creation results in an exception without generating a pdf document.

Minimum example:

[quote, https://lutherisch.de/index.php?option=com_content&view=article&id=1158:11-die-bahai-religion&catid=67:2010-sekten-und-sondergemeinschaften&Itemid=40]
____
test
____

Exception which is thrown:

ERROR => Problem occured while selecting Match
org.xml.sax.SAXParseException: The reference to entity "view" must end with the ';' delimiter.
    at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:261)
    at java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
    at org.joox.JOOX.$(JOOX.java:252)
    at com.kodedu.helper.IOHelper.$(IOHelper.java:238)
    at com.kodedu.service.convert.docbook.DocBookConverter.lambda$convert$1(DocBookConverter.java:67)
    at com.kodedu.service.convert.docbook.DocBookConverter$$Lambda$2295/0x0000000000000000.run(Unknown Source)
    at com.kodedu.service.ThreadService$1.call(ThreadService.java:48)
    at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Task.java:1425)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1414)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

I'm using AsciidocFX 1.7.4

rahmanusta commented 2 years ago

Hi, using quote may help

[quote, 'https://lutherisch.de/index.php?option=com_content&view=article&id=1158:11-die-bahai-religion&catid=67:2010-sekten-und-sondergemeinschaften&Itemid=40']
____
test
____
schrumpelnase commented 2 years ago

Hi! Thanks for your help. The quotes fixes the issue and the pdf is created.

Is quoting in this case the common known asciidoc syntax or kind of workaround? In other words: can there something be done to get this more user friendly and handle it for the user or is quoting "the solution" and using the url unquoted kind of pebkac?