Skip to content

Commit 7b4177d

Browse files
authored
Fix 2 previous isolated high-surrogate code unit handling (#300)
Closes #299.
1 parent 3b36136 commit 7b4177d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/inlines.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ var scanDelims = function(cc) {
320320
// NaN & 0xfc00 = 0
321321
// checks if 2 previous char is high surrogate
322322
if ((two_previous_cc & 0xfc00) !== 0xd800) {
323-
return previous_char;
323+
return str.charAt(pos - 1);
324324
}
325325
return str.slice(pos - 2, pos);
326326
}

0 commit comments

Comments
 (0)