diff --git a/src/Parser/Tokenizer.php b/src/Parser/Tokenizer.php index 28a5dbf..7f4be44 100644 --- a/src/Parser/Tokenizer.php +++ b/src/Parser/Tokenizer.php @@ -144,8 +144,7 @@ private function doStrings(&$tokens, $char, $i) { if ($char === self::STRING) { $string = $this->extractString($i); $length = strlen($string)+1; - $char = $this->getChar($char); - $string = str_replace('\\' . $char, $char, $string); + $string = str_replace('\\' . $this->str[$i], $this->str[$i], $string); $tokens[] = ['type' => self::STRING, 'value' => $string, 'line' => $this->lineNo]; return $length; } diff --git a/tests/GeneralFormatterTest.php b/tests/GeneralFormatterTest.php index 60ba153..43cd148 100644 --- a/tests/GeneralFormatterTest.php +++ b/tests/GeneralFormatterTest.php @@ -176,6 +176,19 @@ public function testFormatDateCustom() { $this->assertEquals($this->stripTabs('