Skip to content

Conversation

TobiasZawada
Copy link

Here is an alternative way to avoid the duplication of overlay images.

I created this alternative branch for the case that you are concerned about any performance impact that make-string could possibly cause.

The function remains exactly the same as long as expanded-string is not propertized with a display property.
If it is propertized then the string from htmlize-tab-spaces which expanded-tab points to is first copied and then the copy is propertized. This way htmlize-tab-spaces also remains untouched.

I find this branch slightly uglier than 51-remove-htmlize-tab-spaces because the resulting code is somewhat more complicated.
But, on the other hand this branch has only minimal changes that just fix the problem and do not change the timing characteristics of the package otherwise. I think it can safely be assumed that display-propertized indentation rarely occurs.

@TobiasZawada
Copy link
Author

TobiasZawada commented May 13, 2024

@hniksic Hi Hrvoje,
Could you please accept this pull-request? It fixes bug #51, is minimal and it does not block potential further development on this topic. Especially, it does not block Fixes 51. Do not use htmlize-tab-spaces for htmlize-untabify-string. #52 if you want to take that approach later on.

Thanks in advance,
Tobias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants