Skip to content

Commit 9df7d27

Browse files
kevvaQix-
authored andcommitted
Don't normalize the input string (#28)
* Don't normalize the input string While nifty, and visually it doesn't have an impact. However, when comparing a normalized string to a normal they can differ even though they look the same on the surface. Also, it's not needed for this module to function correctly. * Remove false positive test
1 parent adc8438 commit 9df7d27

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
4848
};
4949

5050
module.exports = (string, begin, end) => {
51-
const characters = [...string.normalize()];
51+
const characters = [...string];
5252
const ansiCodes = [];
5353

5454
end = typeof end === 'number' ? end : characters.length;

0 commit comments

Comments
 (0)