mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
📝 Mention combined characters
This commit is contained in:
@@ -42,16 +42,18 @@ isCombinedCharacter = (string, index=0) ->
|
||||
not isCombiningCharacter(string, index) and isCombiningCharacter(string, index + 1)
|
||||
|
||||
# Is the character at the given index the start of high/low surrogate pair
|
||||
# or a variation sequence?
|
||||
# a variation sequence, or a combined character?
|
||||
#
|
||||
# * `string` The {String} to check for a surrogate pair or variation sequence.
|
||||
# * `string` The {String} to check for a surrogate pair, variation sequence,
|
||||
# or combined character.
|
||||
# * `index` The {Number} index to look for a surrogate pair at.
|
||||
#
|
||||
# Return a {Boolean}.
|
||||
isPairedCharacter = (string, index=0) ->
|
||||
isSurrogatePair(string, index) or isVariationSequence(string, index) or isCombinedCharacter(string, index)
|
||||
|
||||
# Does the given string contain at least surrogate pair or variation sequence?
|
||||
# Does the given string contain at least surrogate pair, variation sequence,
|
||||
# or combined character?
|
||||
#
|
||||
# * `string` The {String} to check for the presence of paired characters.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user