From f0fa0740fa002761eecd9952ed43b1d42b5cd26e Mon Sep 17 00:00:00 2001 From: x13machine Date: Fri, 8 Mar 2019 12:38:38 -0600 Subject: [PATCH 1/4] 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 From d6892535b324eda242e409dd345d6e610aff364e Mon Sep 17 00:00:00 2001 From: x13machine Date: Fri, 8 Mar 2019 13:14:06 -0600 Subject: [PATCH 2/4] fix misspelling in CONTRIBUTING.md --- docs/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index c8e6ac1211..ac88ba155c 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -26,7 +26,7 @@ The following table lists the ticket type labels we use when there is work to be |:----------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |L0 - security |A security vulnerability within the Marked library is discovered. | |L1 - broken |Valid usage results in incorrect output compared to [supported specifications](#/README.md#specifications) OR causes marked to crash AND there is no known workaround for the issue. | -|L2 - annoying |Similar to L1 - broken only there is a known workaround avaialable for the issue. | +|L2 - annoying |Similar to L1 - broken only there is a known workaround available for the issue. | |RR - refactor and re-engineer |Results in an improvement to developers using Marked (improved readability) or end-users (faster performance) or both. | |NFS - new feature (spec related) |A capability Marked does not currently provide but is in one of the [supported specifications](#/README.md#specifications) | |NFU - new feature (user requested) |A capability Marked does not currently provide but has been requested by users of Marked. | From 85ba9013642a00739c9617da1371689292ec0f64 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Fri, 8 Mar 2019 14:26:32 -0600 Subject: [PATCH 3/4] Update lib/marked.js Co-Authored-By: x13machine --- lib/marked.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/marked.js b/lib/marked.js index 9430a12648..77128aa388 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -1270,7 +1270,7 @@ Parser.prototype.tok = function() { ? this.parseText() : this.tok(); } - return this.renderer.listitem(body, task); + return this.renderer.listitem(body, task, checked); } case 'html': { // TODO parse inline content if parameter markdown=1 From 7de537627637479a02ccc0ee199070a92d2b9253 Mon Sep 17 00:00:00 2001 From: x13machine Date: Fri, 8 Mar 2019 17:28:01 -0600 Subject: [PATCH 4/4] Update list item documentation --- docs/USING_PRO.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/USING_PRO.md b/docs/USING_PRO.md index e0889ad14f..861caa2d77 100644 --- a/docs/USING_PRO.md +++ b/docs/USING_PRO.md @@ -51,7 +51,7 @@ console.log(myMarked('# heading+', { renderer: renderer })); - heading(*string* text, *number* level, *string* raw, *Slugger* slugger) - hr() - list(*string* body, *boolean* ordered, *number* start) -- listitem(*string* text) +- listitem(*string* text, *boolean* task, *boolean* checked) - checkbox(*boolean* checked) - paragraph(*string* text) - table(*string* header, *string* body)