Skip to content

Commit

Permalink
We are talking to the developer that this type of token can not be found
Browse files Browse the repository at this point in the history
  • Loading branch information
KostyaTretyak committed Jan 7, 2018
1 parent ba26457 commit c66cd5e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/marked.js
Expand Up @@ -1082,6 +1082,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 c66cd5e

Please sign in to comment.