Skip to content

Commit

Permalink
Remove special-casing of U+200C and U+200D (#15973)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Sep 16, 2023
1 parent feef4b1 commit feae86e
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@ const start = require(
return ch > 0x7f;
});
let last = -1;
const cont = [0x200c, 0x200d].concat(
require(
"@unicode/unicode-" +
version +
"/Binary_Property/ID_Continue/code-points.js"
).filter(function (ch) {
return ch > 0x7f && search(start, ch, last + 1) == -1;
})
);
const cont = require(
"@unicode/unicode-" + version + "/Binary_Property/ID_Continue/code-points.js"
).filter(function (ch) {
return ch > 0x7f && search(start, ch, last + 1) == -1;
});

function search(arr, ch, starting) {
for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) {
Expand Down

0 comments on commit feae86e

Please sign in to comment.