Skip to content

Commit

Permalink
feat: remove substring helper
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Feb 17, 2022
1 parent 2e95d5c commit ed3fcd7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/Parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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 <img>
* are immediately closed.
Expand Down

0 comments on commit ed3fcd7

Please sign in to comment.