diff --git a/lib/rules_inline/state_inline.mjs b/lib/rules_inline/state_inline.mjs index d1c00a6..8d33819 100644 --- a/lib/rules_inline/state_inline.mjs +++ b/lib/rules_inline/state_inline.mjs @@ -118,9 +118,8 @@ StateInline.prototype.scanDelims = function (start, canSplitWord) { function getLastCharCode (str, pos) { // treat beginning of the line as a whitespace if (pos <= 0) { return 0x20 } - const charCode = str.codePointAt(pos - 1) + const charCode = str.charCodeAt(pos - 1) // not low surrogates (BMP) - // undefined & 0xFC00 = 0, but never happens thanks to the first if if ((charCode & 0xFC00) !== 0xDC00) { return charCode } // undefined if out of range (leading stray low surrogates)