File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ $VERSION = '0.08';
1111# _Mastering Regular Expressions_, p. 132.
1212my $BEGIN_WORD = $] >= 5.006
1313 ? qr / (?:(?<!\p{IsWord} )(?=\p{IsWord} )|(?<!\p{IsPunct} )(?=\p{IsPunct} )|(?<!\p{IsCntrl} )(?=\p{IsCntrl} ))/ msx
14- : qr / (?<!\w )(?=\w )|(?<![\]\[ !"# $ %&'()*+ ,\.\/ :;<=>?@ \^ _`{|}~- ])(?=[\]\[ !"# $ %&'()*+ ,\.\/ :;<=>?@ \^ _`{|}~- ])|(?<![\n\r\t ])(?=[\n\r\v ]) / msx ; ;
14+ : qr / (?:(? <!\w )(?=\w )|(?<![\]\[ !"%&'()*,\.\/ :;? \{ } \- @ ])(?=[\]\[ !"%&'()*,\.\/ :;? \{ } \- @ ])|(?<![\n\r\t ])(?=[\n\r\t ])) / msx ;
1515
1616my %styles = (
1717 ANSIColor => undef ,
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ my $file_diff = 'This is a ' . BOLD . RED . STRIKETHROUGH . "tst;"
5454 . " actual diff, the results would\n "
5555 . ' have been output to ' . BOLD . RED . STRIKETHROUGH . " HTML"
5656 . RESET . BOLD . GREEN . UNDERLINE . " the terminal" . RESET . " .\n\n "
57- . ' Some string with funny ' . BOLD . RED . STRIKETHROUGH . ' $'
58- . RESET . BOLD . GREEN . UNDERLINE . ' @' . RESET . " \n "
57+ . ' Some string with ' . BOLD . RED . STRIKETHROUGH . ' funny $'
58+ . RESET . BOLD . GREEN . UNDERLINE . ' funny @' . RESET . " \n "
5959 . ' chars in the end' . BOLD . RED . STRIKETHROUGH . ' *'
6060 . RESET . BOLD . GREEN . UNDERLINE . ' ?' . RESET . " \n " ;
6161
Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ my $file_diff = qq{<div class="file">$header<span class="hunk">This is a </span>
5555 . qq{ actual diff, the results would\n }
5656 . qq{ have been output to </span><span class="hunk"><del>HTML</del>}
5757 . qq{ <ins>the terminal</ins></span>}
58- . qq{ <span class="hunk">.\n\n Some string with funny </span>}
59- . qq{ <span class="hunk"><del>\$ </del><ins>\@ </ins></span>}
58+ . qq{ <span class="hunk">.\n\n Some string with </span>}
59+ . qq{ <span class="hunk"><del>funny \$ </del><ins>funny \@ </ins></span>}
6060 . qq{ <span class="hunk">\n chars in the end</span>}
6161 . qq{ <span class="hunk"><del>*</del><ins>?</ins></span>}
6262 . qq{ <span class="hunk">\n </span></div>} ;
Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ my $file_diff = qq{<div class="file">$header1}
5656 . qq{ test. Had </span><span class="hunk"><del>it </del></span><span class="hunk">been an\n }
5757 . qq{ actual diff, the results would\n }
5858 . qq{ have been output to </span><span class="hunk"><del>HTML</del></span>}
59- . qq{ <span class="hunk">.\n\n Some string with funny </span>}
60- . qq{ <span class="hunk"><del>\$ </del></span>}
59+ . qq{ <span class="hunk">.\n\n Some string with </span>}
60+ . qq{ <span class="hunk"><del>funny \$ </del></span>}
6161 . qq{ <span class="hunk">\n chars in the end</span>}
6262 . qq{ <span class="hunk"><del>*</del></span><span class="hunk">\n </span></div>\n }
6363 . qq{ <div class="file">$header2 }
@@ -67,8 +67,8 @@ my $file_diff = qq{<div class="file">$header1}
6767 . qq{ test. Had </span><span class="hunk"><ins>this </ins></span><span class="hunk">been an\n }
6868 . qq{ actual diff, the results would\n }
6969 . qq{ have been output to </span><span class="hunk"><ins>the terminal</ins></span>}
70- . qq{ <span class="hunk">.\n\n Some string with funny </span>}
71- . qq{ <span class="hunk"><ins>\@ </ins></span>}
70+ . qq{ <span class="hunk">.\n\n Some string with </span>}
71+ . qq{ <span class="hunk"><ins>funny \@ </ins></span>}
7272 . qq{ <span class="hunk">\n chars in the end</span>}
7373 . qq{ <span class="hunk"><ins>?</ins></span><span class="hunk">\n </span></div>\n } ;
7474
You can’t perform that action at this time.
0 commit comments