mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Refine combo mark ranges.
This commit is contained in:
10
lodash.js
10
lodash.js
@@ -199,8 +199,10 @@
|
|||||||
|
|
||||||
/** Used to compose unicode character classes. */
|
/** Used to compose unicode character classes. */
|
||||||
var rsAstralRange = '\\ud800-\\udfff',
|
var rsAstralRange = '\\ud800-\\udfff',
|
||||||
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
|
rsComboMarksRange = '\\u0300-\\u036f',
|
||||||
rsComboSymbolsRange = '\\u20d0-\\u20f0',
|
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
||||||
|
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
||||||
|
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
||||||
rsDingbatRange = '\\u2700-\\u27bf',
|
rsDingbatRange = '\\u2700-\\u27bf',
|
||||||
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
||||||
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
||||||
@@ -215,7 +217,7 @@
|
|||||||
var rsApos = "['\u2019]",
|
var rsApos = "['\u2019]",
|
||||||
rsAstral = '[' + rsAstralRange + ']',
|
rsAstral = '[' + rsAstralRange + ']',
|
||||||
rsBreak = '[' + rsBreakRange + ']',
|
rsBreak = '[' + rsBreakRange + ']',
|
||||||
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
|
rsCombo = '[' + rsComboRange + ']',
|
||||||
rsDigits = '\\d+',
|
rsDigits = '\\d+',
|
||||||
rsDingbat = '[' + rsDingbatRange + ']',
|
rsDingbat = '[' + rsDingbatRange + ']',
|
||||||
rsLower = '[' + rsLowerRange + ']',
|
rsLower = '[' + rsLowerRange + ']',
|
||||||
@@ -267,7 +269,7 @@
|
|||||||
].join('|'), 'g');
|
].join('|'), 'g');
|
||||||
|
|
||||||
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
||||||
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
|
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
||||||
|
|
||||||
/** Used to detect strings that need a more robust regexp to match words. */
|
/** Used to detect strings that need a more robust regexp to match words. */
|
||||||
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
||||||
|
|||||||
Reference in New Issue
Block a user