JSFiddle - React, Tailwind, and code Playground
HTML
<p>
this is some text which includes the word foo twice in a row to demo the foo based issue.
</p>
JavaScript
$("p").text(function(index, text) {
return text.replace('foo', 'foo2');
});
<p>
this is some text which includes the word foo twice in a row to demo the foo based issue.
</p>
$("p").text(function(index, text) {
return text.replace('foo', 'foo2');
});