mattboldt/typed.js

`preStringTyped` is not called if string begins with HTML tag

steponas opened this issue · 2 comments

Description

preStringTyped is not called when the strings start with HTML tags.

Demo

Demo with counts (expected and actual): https://jsfiddle.net/s8rdLnmt/

Additional Information

This occurs because the HTML tags are "skipped" when rendering but the curIndex is increased, and the "start index" of the render string is > 0. Yet https://github.com/mattboldt/typed.js/blob/main/src/typed.js#L200 expects the index to be 0 to call preStringTyped - thus it does not work.

I am running in to this as well. Is there a fix / workaround?

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.