Allow specifying units in HTML font-size

The 'pt' suffix is always appended to the provided font size for HTML output. This makes it impossible to use units other than 'pt'. Instead, only append 'pt' if the provided font size contains only digits and the '.' character; otherwise, use the font size string as-is.

Example:

highlight -I -K '0.9rem' -O html foo.c

will produce

pre.hl { font-size:0.9rem; }

while

highlight -I -K 16 -O html foo.c

will produce

pre.hl { font-size:16pt; }
Edited by Gregory Anders

Merge request reports

Loading