We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cffb32d commit 6e33e61Copy full SHA for 6e33e61
lib/Text/WordDiff.pm
@@ -10,7 +10,7 @@ $VERSION = '0.08';
10
11
# _Mastering Regular Expressions_, p. 132.
12
my $BEGIN_WORD = $] >= 5.006
13
- ? qr/(?<!\p{IsWord})(?=\p{IsWord})/msx
+ ? qr/(?:(?<!\p{IsWord})(?=\p{IsWord})|(?<!\p{IsPunct})(?=\p{IsPunct})|(?<!\p{IsCntrl})(?=\p{IsCntrl}))/msx
14
: qr/(?<!\w)(?=\w)/msx;
15
16
my %styles = (
0 commit comments