When "Use Words" is checked, the regexp used to split the text uses spaces as a deliminiter. As a result, the plugin doesn't correctly detect tag boundaries and you can end up with invalid html. Using ~(\s+|</?[^>]+>)~ instead of /[\s]+/ on lines 160 and 164 solves the problem.