commonmark.js icon indicating copy to clipboard operation
commonmark.js copied to clipboard

Bug in previous_char() function when handling surrogates during inline parsing of emphasis

Open olivr70 opened this issue 8 months ago • 0 comments

Probable bug in previous_char() function

        if ((two_previous_cc & 0xfc00) !== 0xd800) {
            return previous_char;
        }

as previous_char is the name of the function itself, and in other alternatives the function returns a string, it is unexpected to have the function return itself

olivr70 avatar Apr 27 '25 05:04 olivr70