From c66cd5efc066af8ffce9de1c8f849a30810c092f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D1=8F=20=D0=A2=D1=80=D0=B5=D1=82?= =?UTF-8?q?=D1=8F=D0=BA?= Date: Sun, 7 Jan 2018 15:33:55 +0200 Subject: [PATCH] We are talking to the developer that this type of token can not be found --- lib/marked.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/marked.js b/lib/marked.js index 3e660a684e..26696ff0cc 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -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); + } + } } };