Skip to content

Commit

Permalink
Merge pull request #1005 from KostyaTretyak/patch-renderer
Browse files Browse the repository at this point in the history
Add message: token type cannot be found
  • Loading branch information
styfle committed Dec 18, 2018
2 parents aaca929 + c66cd5e commit 9a522d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/marked.js
Expand Up @@ -1272,6 +1272,14 @@ Parser.prototype.tok = function() {
case 'text': {
return this.renderer.paragraph(this.parseText());
}
default: {
var errMsg = 'Token with "' + this.token.type + '" type was not found.';
if (this.options.silent) {
console.log(errMsg);
} else {
throw new Error(errMsg);
}
}
}
};

Expand Down

0 comments on commit 9a522d6

Please sign in to comment.