[Rt-commit] rt branch, 4.0/encoded-word-whitespace, updated. rt-4.0.5-137-g5806471

Ruslan Zakirov ruz at bestpractical.com
Wed May 9 15:57:05 EDT 2012


The branch, 4.0/encoded-word-whitespace has been updated
       via  5806471ff1dbb2400a9afd7225c49e2e23ac9560 (commit)
      from  484351407de29b9417c4646f362ee10ab1138487 (commit)

Summary of changes:
 lib/RT/I18N.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 5806471ff1dbb2400a9afd7225c49e2e23ac9560
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Wed May 9 17:49:50 2012 +0400

    use lookahead in s/// instead of while loop

diff --git a/lib/RT/I18N.pm b/lib/RT/I18N.pm
index 1b0bf6c..b2dba16 100644
--- a/lib/RT/I18N.pm
+++ b/lib/RT/I18N.pm
@@ -304,7 +304,7 @@ sub DecodeMIMEWordsToEncoding {
                  ([^?]+)        # encoded string
                  \?=            # ?=
                  /x;
-    1 while $str =~ s/($encoded_word)\s+($encoded_word)/$1$5/;
+    $str =~ s/($encoded_word)\s+(?=$encoded_word)/$1/g;
 
     # Also merge quoted-printable sections together, in case multiple
     # octets of a single encoded character were split between chunks.

-----------------------------------------------------------------------


More information about the Rt-commit mailing list