From ed3fcd7de25879705ebc451e271f176c92dde2c8 Mon Sep 17 00:00:00 2001 From: Dylan Piercey Date: Thu, 17 Feb 2022 10:40:16 -0700 Subject: [PATCH] feat: remove substring helper --- src/core/Parser.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/Parser.ts b/src/core/Parser.ts index 673d7ecf..6ad4c946 100644 --- a/src/core/Parser.ts +++ b/src/core/Parser.ts @@ -76,7 +76,7 @@ export class Parser { } read(node: Pos) { - return this.substring(node.pos, node.endPos); + return this.data.slice(node.pos, node.endPos); } reset() { @@ -252,10 +252,6 @@ export class Parser { this.pos = this.maxPos + 1; } - substring(pos: number, endPos?: number) { - return this.data.substring(pos, endPos); - } - /** * This is called to determine if a tag is an "open only tag". Open only tags such as * are immediately closed.