From af2a6b25593855fc4fd324b9d6fab7e0fbe2a89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tautvidas=20Sipavi=C4=8Dius?= Date: Mon, 30 Jan 2017 17:35:03 +0200 Subject: [PATCH] Fix parsing of starting and ending translation string quotes --- .../grunt-wp-i18n/vendor/wp-i18n-tools/extract.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/makepot/node_modules/grunt-wp-i18n/vendor/wp-i18n-tools/extract.php b/tasks/makepot/node_modules/grunt-wp-i18n/vendor/wp-i18n-tools/extract.php index 21b1b1ffe2..1fc84dc014 100644 --- a/tasks/makepot/node_modules/grunt-wp-i18n/vendor/wp-i18n-tools/extract.php +++ b/tasks/makepot/node_modules/grunt-wp-i18n/vendor/wp-i18n-tools/extract.php @@ -287,7 +287,8 @@ class StringExtractor { $arguments = array(); foreach($arguments_matches[0] as $argument) { - $arguments[] = trim($argument, "'\""); + // Remove surrounding quotes of the same type from argument strings + $arguments[] = preg_replace("/^(('|\")+)(.*)\\1$/", "\\3", $argument); } $call = array(