DocWriter strips off the first space character in each line because the processed javadoc contains an extra space (see inline comment). However, when processing external files such as Asciidoc sources (and not javadoc comments), trimming spaces is not needed.
Note that this issue does not affect included source files. This is because whenever a source file is included, DocWriter is put into literal mode. In this mode, it does not strip leading spaces.
Version
0.9.7
Context
While checking the 5.0.0-SNAPSHOT AsciiDoc docs on the website, I noticed that all inline code blocks are missing a leading space character.
Do you have a reproducer?
Here is an example from the vertx-hazelcast documentation (https://vertx.io/docs/vertx-hazelcast/java/).
The AsciiDoc source file contains the following code:
Note the two space characters in lines 4-6.
However, the rendered code block on the website looks like this:
Note that the first space character is missing.
It should look like this:
Analysis
DocWriter
strips off the first space character in each line because the processed javadoc contains an extra space (see inline comment). However, when processing external files such as Asciidoc sources (and not javadoc comments), trimming spaces is not needed.Note that this issue does not affect included source files. This is because whenever a source file is included,
DocWriter
is put into literal mode. In this mode, it does not strip leading spaces.I will submit a PR with a fix.