EdernClemente / TypeLighterJS-Typewriter

Take a stride into the world of dynamic and appealing typewriters. You can be sure that you will never even think of looking back.
MIT License
288 stars 12 forks source link

HTML Entity handling #3

Closed tomlutzenberger closed 4 years ago

tomlutzenberger commented 4 years ago

Hi Edern. I wanted to ask if there are plans to extend the functionality of TypeLighter. In a current project, I used your library and it works great. But it turned out that it can't handle HTML entities or more specific "Soft-Hyphens" ­. Because TypeLighter prints character after character, those entities get printed as well and show up as plain text until they're complete. I looked at your implementation and have some sort of idea how to solve this. Would you include such functionality?

tomlutzenberger commented 4 years ago

I found out that I can avoid/solve this problem by using escaped unicode characters. In my case using \u00ad instead of ­ fixed everything.

EdernClemente commented 4 years ago

Hi @tomlutzenberger. Sorry for the delayed response, I’m working a lot this year. Thanks for your solution 🙂