I put in some code that strips all newlines from any HTML input because findAndReplaceDOMText was failing to replace text whenever it encountered a newline.
I was thinking about this the other day, and realized that my find regex is /.+/. This will match 1 or more of any characters...except for newlines. I'm pretty sure that if I change this to something like /(.|\n)+/ it will work correctly without the newline removal workaround.
I put in some code that strips all newlines from any HTML input because findAndReplaceDOMText was failing to replace text whenever it encountered a newline.
I was thinking about this the other day, and realized that my
find
regex is/.+/
. This will match 1 or more of any characters...except for newlines. I'm pretty sure that if I change this to something like/(.|\n)+/
it will work correctly without the newline removal workaround.