'Tween is incorrectly replaced. Doesn't affect most text on the web, but I recently read a short story with a character from the American South, and it got pretty butchered.
This patch uses a technique I stoleborrowed from this post on SE. It uses a clever regex to capture the ' and change the replacement output depending on whether it was detected.
I used the following as my test suite and it properly handles them all:
tween
tweens
between
tweener
trouble 'tween the two
Those tweens are ruining everything
'Tween is incorrectly replaced. Doesn't affect most text on the web, but I recently read a short story with a character from the American South, and it got pretty butchered.
This patch uses a technique I
stoleborrowed from this post on SE. It uses a clever regex to capture the'
and change the replacement output depending on whether it was detected.I used the following as my test suite and it properly handles them all:
If you have any questions or comments, fire away.