From 0642b680b613fdd6cb774debacf65a0d0d1f08e8 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sun, 27 Apr 2014 13:55:27 +0200 Subject: [PATCH] Fixed the regex of the step matching url to avoid breaking formatters The inner group needs to be non-capturing. Fixes #99 --- i18n/cs.xliff | 4 ++-- i18n/da.xliff | 4 ++-- i18n/de.xliff | 4 ++-- i18n/es.xliff | 4 ++-- i18n/fr.xliff | 4 ++-- i18n/id.xliff | 6 +++--- i18n/it.xliff | 4 ++-- i18n/ja.xliff | 4 ++-- i18n/nl.xliff | 6 +++--- i18n/pl.xliff | 4 ++-- i18n/pt.xliff | 4 ++-- i18n/ru.xliff | 4 ++-- i18n/sk.xliff | 4 ++-- i18n/sv.xliff | 4 ++-- i18n/zh-CN.xliff | 4 ++-- src/Behat/MinkExtension/Context/MinkContext.php | 2 +- src/Behat/MinkExtension/Context/MinkDictionary.php | 2 +- 17 files changed, 34 insertions(+), 34 deletions(-) diff --git a/i18n/cs.xliff b/i18n/cs.xliff index cb8d58c..74ec33a 100644 --- a/i18n/cs.xliff +++ b/i18n/cs.xliff @@ -99,8 +99,8 @@ [^"]+)"$/]]> - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/da.xliff b/i18n/da.xliff index 1c9b9e1..cf584e3 100644 --- a/i18n/da.xliff +++ b/i18n/da.xliff @@ -136,8 +136,8 @@ - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/de.xliff b/i18n/de.xliff index 662c509..ed7b3b1 100644 --- a/i18n/de.xliff +++ b/i18n/de.xliff @@ -75,8 +75,8 @@ [^"]+)" sein$/]]> - "([^"]|\\")*")$/]]> - "([^"]|\\")*") übereinstimmen$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*") übereinstimmen$/]]> \d+)$/]]> diff --git a/i18n/es.xliff b/i18n/es.xliff index db34d4e..6292f92 100644 --- a/i18n/es.xliff +++ b/i18n/es.xliff @@ -115,8 +115,8 @@ [^"]+)"$/]]> - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/fr.xliff b/i18n/fr.xliff index 77a5450..0cf6adb 100644 --- a/i18n/fr.xliff +++ b/i18n/fr.xliff @@ -119,8 +119,8 @@ - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/id.xliff b/i18n/id.xliff index 4a8eacd..8e045de 100644 --- a/i18n/id.xliff +++ b/i18n/id.xliff @@ -131,8 +131,8 @@ - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> @@ -181,7 +181,7 @@ - + diff --git a/i18n/it.xliff b/i18n/it.xliff index ca3a8e5..34ca281 100644 --- a/i18n/it.xliff +++ b/i18n/it.xliff @@ -107,8 +107,8 @@ [^"]+)"$/]]> - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/ja.xliff b/i18n/ja.xliff index 4fbefdd..cb33099 100644 --- a/i18n/ja.xliff +++ b/i18n/ja.xliff @@ -99,8 +99,8 @@ [^\s]+) を表示していること$/u]]> - "([^"]|\\")*")$/]]> - "([^"]|\\")*") にマッチすること$/u]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*") にマッチすること$/u]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/nl.xliff b/i18n/nl.xliff index 8c566fb..0719f30 100644 --- a/i18n/nl.xliff +++ b/i18n/nl.xliff @@ -115,8 +115,8 @@ [^"]+)" zijn$/]]> - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> @@ -164,4 +164,4 @@ - \ No newline at end of file + diff --git a/i18n/pl.xliff b/i18n/pl.xliff index 38b3332..8ba30cc 100644 --- a/i18n/pl.xliff +++ b/i18n/pl.xliff @@ -99,8 +99,8 @@ [^"]+)"$/]]> - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/pt.xliff b/i18n/pt.xliff index 849801a..054db63 100644 --- a/i18n/pt.xliff +++ b/i18n/pt.xliff @@ -115,8 +115,8 @@ [^"]+)"$/]]> - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/ru.xliff b/i18n/ru.xliff index 6cbfa6e..edab76e 100644 --- a/i18n/ru.xliff +++ b/i18n/ru.xliff @@ -131,8 +131,8 @@ - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/sk.xliff b/i18n/sk.xliff index cd8fe6c..8d06b23 100644 --- a/i18n/sk.xliff +++ b/i18n/sk.xliff @@ -107,8 +107,8 @@ [^"]+)"$/]]> - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/sv.xliff b/i18n/sv.xliff index d73bc53..d3c60b8 100644 --- a/i18n/sv.xliff +++ b/i18n/sv.xliff @@ -95,8 +95,8 @@ [^"]+)"$/]]> - "([^"]|\\")*")$/]]> - "([^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/zh-CN.xliff b/i18n/zh-CN.xliff index 57c0947..99136cb 100644 --- a/i18n/zh-CN.xliff +++ b/i18n/zh-CN.xliff @@ -100,8 +100,8 @@ [^\s]+)”$/]]> - "([^"]|\\")*")$/]]> - "([^"]|\\")*")”$/]]> + "(?:[^"]|\\")*")$/]]> + "(?:[^"]|\\")*")”$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/src/Behat/MinkExtension/Context/MinkContext.php b/src/Behat/MinkExtension/Context/MinkContext.php index 3c729dd..a4060c4 100644 --- a/src/Behat/MinkExtension/Context/MinkContext.php +++ b/src/Behat/MinkExtension/Context/MinkContext.php @@ -211,7 +211,7 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface /** * Checks, that current page PATH matches regular expression. * - * @Then /^the (?i)url(?-i) should match (?P"([^"]|\\")*")$/ + * @Then /^the (?i)url(?-i) should match (?P"(?:[^"]|\\")*")$/ */ public function assertUrlRegExp($pattern) { diff --git a/src/Behat/MinkExtension/Context/MinkDictionary.php b/src/Behat/MinkExtension/Context/MinkDictionary.php index 908298a..525c7e1 100644 --- a/src/Behat/MinkExtension/Context/MinkDictionary.php +++ b/src/Behat/MinkExtension/Context/MinkDictionary.php @@ -302,7 +302,7 @@ trait MinkDictionary /** * Checks, that current page PATH matches regular expression. * - * @Then /^the (?i)url(?-i) should match (?P"([^"]|\\")*")$/ + * @Then /^the (?i)url(?-i) should match (?P"(?:[^"]|\\")*")$/ */ public function assertUrlRegExp($pattern) {