File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -20,20 +20,21 @@ Select [Unist][] nodes with CSS-like selectors.
2020```
2121Get all TODO items from this list:
2222
23- 1. Step 1.
24- 2. TODO Step 2.
25- 3. Step 3.
26- 1. TODO Step 3.1.
27- 2. Step 3.2.
28- 3. TODO Step 3.3.
23+ 1. Step 1.
24+ 2. TODO Step 2.
25+ 3. Step 3.
26+
27+ 1. TODO Step 3.1.
28+ 2. Step 3.2.
29+ 3. TODO Step 3.3.
2930```
3031
3132[ remark] [ ] takes this Markdown as an input and returns unist syntax tree. After that, we use ` unist-util-select ` to extract the required parts:
3233
3334``` js
3435var select = require (' unist-util-select' );
3536
36- var markdown = fs .readFileSync (' example.md' , ' utf8 ' );
37+ var markdown = fs .readFileSync (' example.md' );
3738var ast = remark .parse (markdown);
3839
3940select (ast, ' list text[value*=TODO]' )
You can’t perform that action at this time.
0 commit comments