Skip to content

Commit

Permalink
Merge branch 'EmphasisFixes' of https://github.com/calculuschild/marked
Browse files Browse the repository at this point in the history
… into EmphasisFixes
  • Loading branch information
calculuschild committed Jul 9, 2020
2 parents e27e6f9 + ad720c1 commit 6b729ed
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Tokenizer.js
Original file line number Diff line number Diff line change
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 endReg;

if (match[0] === '**') { endReg = this.rules.inline.strong.endAst; } else { endReg = this.rules.inline.strong.endUnd; }
const endReg = match[0] === '**' ? this.rules.inline.strong.endAst : this.rules.inline.strong.endUnd;

endReg.lastIndex = 0;

Expand All @@ -519,9 +517,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 endReg;

if (match[0] === '*') { endReg = this.rules.inline.em.endAst; } else { endReg = this.rules.inline.em.endUnd; }
const endReg = match[0] === '*' ? this.rules.inline.em.endAst : this.rules.inline.em.endUnd;

endReg.lastIndex = 0;

Expand Down

0 comments on commit 6b729ed

Please sign in to comment.