Forum How do I...?

preserving whitespace in pre code blocks

elrond25
I am using <pre><code> blocks to paste code into my document to process with highlight.js and Prince. It is not preserving the indentation in the final PDF.

using the following CSS to style the code (SCSS).

pre {
white-space: pre-line;
width: 100%;

code {
font-family: 'Source Code Pro', monospace;
font-size: 1em;
line-height: 1.2em;
overflow-wrap: break-word;
tab-size: 2;
width: 100%;
word-wrap: break-word;
}
}

I'm trying to figure out if the problem is in Prince or during the transformation from XML to XHTML

Carlos
mikeday
Prince doesn't support the tab-size property, so at the moment tabs will be converted to 8 spaces.
elrond25
The problem is that I'm getting no tabs at all where I expected to get the content tabbed.
mikeday
Can you attach a small sample document demonstrating the problem?