mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
When a hyphen - or double hyphen -- was at the start or the end of a string, it wasn't texturized correctly.
Fixes #31030 git-svn-id: https://develop.svn.wordpress.org/trunk@31199 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -208,6 +208,19 @@ class Tests_Formatting_WPTexturize extends WP_UnitTestCase {
|
||||
$this->assertEquals( "$nbsp— ", wptexturize( "$nbsp-- ") );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 31030
|
||||
*/
|
||||
function test_hyphens_at_start_and_end() {
|
||||
$this->assertEquals( '– ', wptexturize( '- ' ) );
|
||||
$this->assertEquals( '– –', wptexturize( '- -' ) );
|
||||
$this->assertEquals( ' –', wptexturize( ' -' ) );
|
||||
|
||||
$this->assertEquals( '— ', wptexturize( '-- ' ) );
|
||||
$this->assertEquals( '— —', wptexturize( '-- --' ) );
|
||||
$this->assertEquals( ' —', wptexturize( ' --' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test spaces around quotes.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user