Fix abbreviations mixed with quotes, example: '99% of people'.

Add/alter unit tests.

Props miqrogroove.
Fixes #26850.


git-svn-id: https://develop.svn.wordpress.org/trunk@28765 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-06-17 20:18:38 +00:00
parent 1f4d925102
commit b11edb94d9
2 changed files with 13 additions and 9 deletions

View File

@@ -313,8 +313,8 @@ class Tests_Formatting_WPTexturize extends WP_UnitTestCase {
"word ’99’s word",
),
array(
"according to our source, '33% of all students scored less than 50' on the test.", // Apostrophes and primes have priority over quotes
"according to our source, ’33% of all students scored less than 50′ on the test.",
"according to our source, '33 students scored less than 50' on the test.", // Apostrophes and primes have priority over quotes
"according to our source, ’33 students scored less than 50′ on the test.",
),
);
}
@@ -1060,12 +1060,12 @@ class Tests_Formatting_WPTexturize extends WP_UnitTestCase {
'word “4,242.00” word',
),
array(
"word '99's word", // Is this correct?
"word ‘99’s word",
"word '99's word",
"word ’99’s word",
),
array(
"word '99'samsonite",
"word ‘99’samsonite",
"word ’99’samsonite",
),
);
}
@@ -1340,6 +1340,10 @@ class Tests_Formatting_WPTexturize extends WP_UnitTestCase {
"word '999 word", // Does not match the apos pattern, should be opening quote.
"word ‘999 word",
),
array(
"word '99% word",
"word ‘99% word",
),
array(
"word '9 word",
"word ‘9 word",