From 94111e384702c7e14e0279a46f09ee62899bf693 Mon Sep 17 00:00:00 2001 From: Fengming Sun Date: Wed, 6 Nov 2013 23:39:51 +0800 Subject: [PATCH] fix preg_splite may cause some chinese character error --- CodeSniffer/CommentParser/AbstractParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeSniffer/CommentParser/AbstractParser.php b/CodeSniffer/CommentParser/AbstractParser.php index f7f6a653be..5012bf5105 100644 --- a/CodeSniffer/CommentParser/AbstractParser.php +++ b/CodeSniffer/CommentParser/AbstractParser.php @@ -239,7 +239,7 @@ private function _parse($comment) // spaces as well as separate tokens. $flags = (PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); $words = preg_split( - '|(\s+)|', + '|(\s+)|u', $line.$this->phpcsFile->eolChar, -1, $flags