Menu

#311 Add support for colors (and other styles) inside <pre> tags

open
nobody
1
2014-04-08
2014-04-08
No

Hi!

I'd like to put highlighted code into a PDF. As most IDE's or code-highlighters can export to HTML, the writeHTML() method seemed ideal for that task.

However all code inside <pre> tags ignores formatting and color, which are extremely helpful for code readability.

One could strip the <pre> tags and use nl2br(), but this way the code indentation is not preserved.

I get that bold or italic code segments would need another monospaced font-variant, but at least colors inside <pre> would be insanely helpful.

Discussion


Log in to post a comment.