Skip to content

Commit

Permalink
add token boolean to listitem parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
x13machine committed Mar 8, 2019
1 parent 5ed5271 commit f0fa074
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -1258,18 +1258,19 @@ 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') {
body += !loose && this.token.type === 'text'
? 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
Expand Down

0 comments on commit f0fa074

Please sign in to comment.