From f0fa0740fa002761eecd9952ed43b1d42b5cd26e Mon Sep 17 00:00:00 2001 From: x13machine Date: Fri, 8 Mar 2019 12:38:38 -0600 Subject: [PATCH] add token boolean to listitem parameter --- lib/marked.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/marked.js b/lib/marked.js index ac39650c77..9430a12648 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -1258,9 +1258,11 @@ Parser.prototype.tok = function() { case 'list_item_start': { body = ''; var loose = this.token.loose; + var checked = this.token.checked; + var task = this.token.task; if (this.token.task) { - body += this.renderer.checkbox(this.token.checked); + body += this.renderer.checkbox(checked); } while (this.next().type !== 'list_item_end') { @@ -1268,8 +1270,7 @@ Parser.prototype.tok = function() { ? this.parseText() : this.tok(); } - - return this.renderer.listitem(body); + return this.renderer.listitem(body, task); } case 'html': { // TODO parse inline content if parameter markdown=1