You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a recent API addition (the element filter, see #11) I was considering a slight refactor of the way findAndReplaceDOMText is called. It's getting quite busy/lengthy at the moment and it may benefit from something like:
I have made a provisional apiCleanup branch for people to play with. Let me know your thoughts. It'll most likely be completed and merged to master in the next few days.
Notable features are (see apiCleanup branch readme.md)
Ability to replace plain text or wrap text with DOM nodes
Cleaner API
More meaningful portion/match objects passed to custom replace functions.
Ability to choose between 'retain' and 'first' modes for portion-replacement-boundaries.
After a recent API addition (the element filter, see #11) I was considering a slight refactor of the way
findAndReplaceDOMText
is called. It's getting quite busy/lengthy at the moment and it may benefit from something like:(i.e. an intuitive configuration object as the second arg)
Of course, the old way would still work but would be deprecated.
This would make it more readable and much easier to add new features without adding complexity to the already-long argument list.
I am planning this change for 0.4.0. Thoughts are welcome.
The text was updated successfully, but these errors were encountered: