Skip to content

Commit

Permalink
Replace substr with substring
Browse files Browse the repository at this point in the history
CvX committed Jul 11, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 5950786 commit ae8ef14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/evented-tokenizer.ts
Original file line number Diff line number Diff line change
@@ -117,9 +117,9 @@ export default class EventedTokenizer {
private isIgnoredEndTag(): boolean {
let tag = this.tagNameBuffer.toLowerCase();

return (tag === 'title' && this.input.substr(this.index, 8) !== '</title>') ||
(tag === 'style' && this.input.substr(this.index, 8) !== '</style>') ||
(tag === 'script' && this.input.substr(this.index, 9) !== '</script>');
return (tag === 'title' && this.input.substring(this.index, this.index + 8) !== '</title>') ||
(tag === 'style' && this.input.substring(this.index, this.index + 8) !== '</style>') ||
(tag === 'script' && this.input.substring(this.index, this.index + 9) !== '</script>');
}

states: { [k in TokenizerState]?: (this: EventedTokenizer) => void } = {

0 comments on commit ae8ef14

Please sign in to comment.