giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.38k stars 461 forks source link

Export as HTML does not honor whitespace #424

Open lastlistener opened 5 years ago

lastlistener commented 5 years ago

When exporting a CherryTree node/nodes as HTML, the export engine appears to ignore any whitespace found in the source text beyond a single "space" character. This seems real undesirable and basically makes the exported HTML unusable for anything where whitespace is critical to readability, such as code.

Lines of text in CherryTree 0.38.4 editor (code formatted with multiple spaces/tabs):

image

Generated markup:

image

Markup when rendered:

image

I love CherryTree and use it for all of my notes. I also sometimes export the notes as HTML and upload them to a blog. Saw this while doing that.

giuspen commented 5 years ago

Was the code exported from:

lastlistener commented 5 years ago

This example was rich text with the monospace style applied. However I also tried a code box with the "plain text" syntax option (no particular code syntax, as it was i86 assembly code and there is no syntax setting for that) and it seemed to have the same issue.