X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FHTML%2FString%2FTT%2FDirective.pm;fp=lib%2FHTML%2FString%2FTT%2FDirective.pm;h=d78aed43251effdf2532575f6e7059e56626b755;hb=9722df8b3564e0a937c061092a11184205827497;hp=54547859d3c3ef682eab4e2ce0f1fa1694ec8895;hpb=320003df2867ad8050cbe2e1b30942297ff4dd06;p=scpubgit%2FHTML-String.git diff --git a/lib/HTML/String/TT/Directive.pm b/lib/HTML/String/TT/Directive.pm index 5454785..d78aed4 100644 --- a/lib/HTML/String/TT/Directive.pm +++ b/lib/HTML/String/TT/Directive.pm @@ -36,14 +36,14 @@ sub text { # which then gets overload::constant'ed appropriately. # The first two lines of the s! were assembled from the escape sequences - # table in "Quote and Quote-like Operators" in perlop by Lukas Mai, then - # the last line handles sigils. + # table in "Quote and Quote-like Operators" in perlop by Lucas Mai, then + # the . handles any other single character escape (\$, \@, \\ etc.) my $str = perlstring $text; $str =~ s! \\ ( [abefnrt] | c. | o \{ [0-7]+ \} | x (?: \{ [[:xdigit:]]+ \} | [[:xdigit:]]{1,2} ) | N \{ [^{}]* \} | [0-7]{1,3} - | \$ | \@ ) + | . ) !"."\\$1"."!xg; return $str;