Create a Dynalist node with line breaks (as created with Ctrl + Shift + Return) and whitespace for indentation at the start of the lines. No need to add any Markdown. An example node could contain this text, shown as entered in Dynalist:
CREATE TABLE IF NOT EXISTS data (
id VARCHAR NULL,
name VARCHAR NULL,
url VARCHAR NULL,
count INT NULL
);
Observe that the whitespace used for indentation is still visible after leaving the nodeās edit mode in Dynalist. This applies even though the node is just unformatted text, not using the ``` ⦠``` Markdown markup for code blocks.
Export that node to HTML from the nodeās context menu.
Expected result
The HTML export should also show the whitespace that was visible inside Dynalist, because the expectation is that it will look the same as much as possible. That would mean rendering these whitespace characters as in HTML.
Actual result
The whitespace used for indentation is not visible. The HTML code does not contain any characters representing it, not even invisible normal blank characters. This applies for leading whitespace at the start of a line, and probably also for whitespace inside lines (but I did not test the latter).
I would guess adding white-space css property should fix things but Iām not sure how well itās supported depending on where youāre trying to put the HTML in, but that shouldnāt be too hard to fix for the general purpose HTML use case.
I see the spacing is in the HTML export, itās just not properly shown because of HTML space collapsing. Iāve added some CSS to make the spaces show up properly. If you paste into a text editor, they would show up.
Confirming that the spacing is in the HTML export. I just didnāt see it because in Firefox, the āInspect Elementā mode will not show it in the source even for elements that have white-space: pre-wrap set in CSS. (I guess that could be considered a bug in Firefox. It looks different in your screenshot, so probably thatās Chrome.)
Thank you for the CSS fix! Couldnāt use it yet because now the exports donāt contain any CSS styling for some reason. But thatās another issue that Iāll report separately if I donāt see it reported yet.