From 40ac4c42c40d413d77468cb66cceee6d71eec6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20B=C3=B6hm?= <188768+fb55@users.noreply.github.com> Date: Tue, 14 Dec 2021 22:32:50 +0000 Subject: [PATCH] refactor(tokenizer): Make sequences `Uint8Array`s --- src/Tokenizer.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/Tokenizer.ts b/src/Tokenizer.ts index 6374a8d05..6b5182f9d 100644 --- a/src/Tokenizer.ts +++ b/src/Tokenizer.ts @@ -129,14 +129,12 @@ export interface Callbacks { * sequences with an increased offset. */ const Sequences = { - Cdata: new Uint16Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]), // CDATA[ - CdataEnd: new Uint16Array([0x5d, 0x5d, 0x3e]), // ]]> - CommentEnd: new Uint16Array([0x2d, 0x2d, 0x3e]), // `-->` - ScriptEnd: new Uint16Array([ - 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - ]), // ` + CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]), // `-->` + ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]), // `