Klap-in / dokuwiki-plugin-bookcreator

Allow to select some pages and create a book (PDF, ODT or text)

Home Page:https://www.dokuwiki.org/plugin:bookcreator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Line breaks disappear from code blocks when exporting printable version

halfbeing opened this issue · comments

When exporting a printable version (I haven't tested the PDF export), line breaks are removed from code blocks so that text that was on several lines ends up all in one line.

What do you mean by printable version?
Where or in which program do you view this version?

The printable version is one of the three BookCreator export options along with PDF and plain text. Since it is basically just a very long HTML document, I view it in my browser (Chrome).

If you test the wiki:syntax page, default included in a DokuWiki installation, then I see all code blocks in the HTML, and in the print-preview (the print preview has a significant reduced layout..). In the code blocks I see in both views the line breaks.

for example this example looks fine:

==== Syntax Highlighting ====

[[wiki:DokuWiki]] can highlight sourcecode, which makes it easier to read. It uses the [[http://qbnz.com/highlighter/|GeSHi]] Generic Syntax Highlighter -- so any language supported by GeSHi is supported. The syntax uses the same code and file blocks described in the previous section, but this time the name of the language syntax to be highlighted is included inside the tag, e.g. ''<nowiki><code java></nowiki>'' or ''<nowiki><file java></nowiki>''.

<code java>
/**
 * The HelloWorldApp class implements an application that
 * simply displays "Hello World!" to the standard output.
 */
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); //Display the string.
    }
}
</code>

If this is still an issue, please reopen and add an example to help reproducing the case.