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. | 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) diff --git a/lib/marked.js b/lib/marked.js index ac39650c77..77128aa388 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, checked); } case 'html': { // TODO parse inline content if parameter markdown=1