forked from syntax-tree/hast-util-to-mdast
-
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.
Support task list checkboxes outside
p
elements
Previously, list items with leading checkboxes would only be treated as task list items if the checkbox was wrapped in a `<p>` element, like: <li><p><input type="checkbox"> Other content</p></li> This adds support for detecting task lists even when the checkbox is not nested in a `<p>`: <li><input type="checkbox"> Other content</li> This does *not* add support for some other complex scenarios, such as the checkbox being inside other phrasing content, being more deeply nested, or having comments in front of it: <li><strong><input type="checkbox"> Other content</strong></li> <li><p><strong><input type="checkbox"> Other content</strong></p></li> <li><!-- Comment --><input type="checkbox"> Other content</li> Fixes syntax-tree#80.
- Loading branch information
Showing
5 changed files
with
58 additions
and
22 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 |
---|---|---|
|
@@ -57,3 +57,9 @@ Quuux. | |
5. [ ] **Foxtrot** | ||
|
||
6. [ ] **Golf** | ||
|
||
7. [ ] Hotel | ||
|
||
8. [ ] India | ||
|
||
9. [ ] Juliet |
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 |
---|---|---|
|
@@ -57,3 +57,9 @@ Quuux. | |
* [ ] **Foxtrot** | ||
|
||
* [ ] **Golf** | ||
|
||
* [ ] Hotel | ||
|
||
* [ ] India | ||
|
||
* [ ] Juliet |