diff --git a/lib/rules_inline/state_inline.mjs b/lib/rules_inline/state_inline.mjs index ddce556..225837b 100644 --- a/lib/rules_inline/state_inline.mjs +++ b/lib/rules_inline/state_inline.mjs @@ -120,6 +120,7 @@ StateInline.prototype.scanDelims = function (start, canSplitWord) { if (pos <= 0) { return 0x20 } const charCode = str.codePointAt(pos - 1) // not low surrogates (BMP) + // undefined & 0xFC00 = 0 if ((charCode & 0xFC00) !== 0xDC00) { return charCode } // undefined if out of range (leading stray low surrogates)