mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
Editor: word count: exclude HTML comments and entities
Also make sure `type` is one of the three allowed types and remove unnecessary regex flags. See #30966. git-svn-id: https://develop.svn.wordpress.org/trunk@33344 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -58,6 +58,20 @@
|
||||
words: 1,
|
||||
characters: 1,
|
||||
all: 1
|
||||
},
|
||||
{
|
||||
message: 'HTML comment.',
|
||||
string: 'one<!-- comment -->two three',
|
||||
words: 2,
|
||||
characters: 11,
|
||||
all: 12
|
||||
},
|
||||
{
|
||||
message: 'HTML entity.',
|
||||
string: '> test',
|
||||
words: 1,
|
||||
characters: 5,
|
||||
all: 6
|
||||
}
|
||||
], function( test ) {
|
||||
_.each( [ 'words', 'characters', 'all' ], function( type ) {
|
||||
|
||||
Reference in New Issue
Block a user