Skip to content

Commit c66cd5e

Browse files
committed
We are talking to the developer that this type of token can not be found
1 parent ba26457 commit c66cd5e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/marked.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,14 @@ Parser.prototype.tok = function() {
10821082
case 'text': {
10831083
return this.renderer.paragraph(this.parseText());
10841084
}
1085+
default: {
1086+
var errMsg = 'Token with "' + this.token.type + '" type was not found.';
1087+
if (this.options.silent) {
1088+
console.log(errMsg);
1089+
} else {
1090+
throw new Error(errMsg);
1091+
}
1092+
}
10851093
}
10861094
};
10871095

0 commit comments

Comments
 (0)