forked from markedjs/marked
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Github Task Lists under the gfm flag. Changes to API * list(*string* body, *boolean* ordered, *boolean* taskList) * listitem(*string* text, [*boolean* checked]). `checked` is defined when you have a list item which starts with `[ ] ` or `[x] `.If defined its a boolean depending on whether the `x` is present. When checked is defined we add a input type type `checkbox` to the list item and add the class `task-list-item-checkbox`. `taskList` is true if a list has any list items where `checked` is defined. When true we add the class `task-list` to the list. Resolves markedjs#107
- Loading branch information
1 parent
38f1727
commit bf39349
Showing
4 changed files
with
60 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<ul class="task-list"> | ||
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox"> foo</li> | ||
<li>bar</li> | ||
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" checked> baz</li> | ||
<li>[] bam | ||
<ul class="task-list"> | ||
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox"> bim</li> | ||
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox"> lim</li> | ||
</ul> | ||
</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
* [ ] foo | ||
* bar | ||
* [x] baz | ||
* [] bam | ||
* [ ] bim | ||
* [ ] lim |