Skip to content

Commit

Permalink
Make strEnd const
Browse files Browse the repository at this point in the history
Co-authored-by: Tony Brix <tony@brix.ninja>
  • Loading branch information
calculuschild and UziTech committed Jul 9, 2020
1 parent 226bbe7 commit 1fb141d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Tokenizer.js
Expand Up @@ -494,9 +494,7 @@ module.exports = class Tokenizer {

if (match && (!match[1] || (match[1] && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))))) {
maskedSrc = maskedSrc.slice(-1 * src.length);
let strEnd;

if (match[0] === '**') { strEnd = this.rules.inline.strEndAst; } else { strEnd = this.rules.inline.strEndUnd; }
const strEnd = match[0] === '**' ? this.rules.inline.strEndAst : this.rules.inline.strEndUnd;

strEnd.lastIndex = 0;

Expand Down

0 comments on commit 1fb141d

Please sign in to comment.