firstlane / buwwshit

https://firstlane.github.io/buwwshit
1 stars 0 forks source link

Fix newline workaround #29

Open firstlane opened 3 years ago

firstlane commented 3 years ago

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.