mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
63ff16843c
* [overleaf-editor-core] Introduce ScanOp and subclasses * [overleaf-editor-core] Remove unused methods * [overleaf-editor-core] Add tests for ScanOps * [overleaf-editor-core] Simplify merge * [overleaf-editor-core] Make ApplyContexts mutable * [overleaf-editor-core] Remove unnecessary containsNonBmpChars check * [overleaf-editor-core] Revert to using reduce * [overleaf-editor-core] Modify inputCursor after using it * [overleaf-editor-core] Rename DeleteOp to RemoveOp * [overleaf-editor-core] Remove useless constructor * [overleaf-editor-core] Mutate in mergeWith * [overleaf-editor-core] Add check for out-of-bounds retain * [overleaf-editor-core] Move error import GitOrigin-RevId: d07bd58177579638551257d56f087e8967e5b52f
14 lines
327 B
JavaScript
14 lines
327 B
JavaScript
/*
|
|
* Misc functions
|
|
*/
|
|
|
|
'use strict'
|
|
|
|
/**
|
|
* @param {string} str
|
|
* @returns {boolean} true if the given string contains non-BMP chars otherwise false
|
|
*/
|
|
exports.containsNonBmpChars = function utilContainsNonBmpChars(str) {
|
|
// check for first (high) surrogate in a non-BMP character
|
|
return /[\uD800-\uDBFF]/.test(str)
|
|
}
|