Closed TobiasZawada closed 4 months ago
@hniksic This error affects the HTML export of source code files with TeXfrag fragments. Such export is great for comments in math related source codes which are not supported by Doxygen, such like Modelica. Below you can see images of a toy-example that shows how the HTML export looks like with the fix or with the workaround and without it.
Switching off htmlize-untabify
is a workaround. But a workaround is inconvenient when you want to promote the solution for the source code documentation.
Pull request https://github.com/hniksic/emacs-htmlize/pull/53 is a minimal fix for this issue with minimal impact on current behavior. It could only have a performance impact for tab indents that are really propertized with some images. I think this almost never happens.
From my point of view there is nothing special about https://github.com/hniksic/emacs-htmlize/pull/53 and you could accept it right away.
Later on we could think about pull request https://github.com/hniksic/emacs-htmlize/pull/52 for the same issue.
This pull request simplifies the code. It removes htmlize-tab-spaces
which looks like a performance optimization.
But, has the performance impact really been measured? Sometimes measurement results can really surprise.
Toy-example with fix:
Toy-example without fix:
The following lisp-code creates a buffer
*test*
with an embedded svg image data.If
htmlize-untabify
is t, then the image appears as replacement for every tab in the HTML file generated withhtmlize-buffer
– three times overall.This is because
htmlize-untabify-string
accidently puts the display property with the image on the corresponding table entry inhtmlize-tab-spaces
.