File tree 2 files changed +16
-21
lines changed
2 files changed +16
-21
lines changed Original file line number Diff line number Diff line change 29
29
"esmangle" : " ^1.0.0" ,
30
30
"hast" : " 0.0.2" ,
31
31
"istanbul" : " ^0.4.0" ,
32
- "remark" : " ^4.0.0" ,
33
- "remark-comment-config" : " ^3.0.0" ,
34
- "remark-github" : " ^4.0.1" ,
35
- "remark-lint" : " ^3.0.0" ,
36
- "remark-slug" : " ^4.1.0" ,
37
- "remark-usage" : " ^3.0.0" ,
38
- "remark-validate-links" : " ^3.0.0" ,
39
- "remark-yaml-config" : " ^3.0.0" ,
32
+ "remark-cli" : " ^2.1.0" ,
33
+ "remark-preset-wooorm" : " ^1.0.0" ,
40
34
"tape" : " ^4.0.0" ,
41
35
"xo" : " ^0.17.0"
42
36
},
43
37
"scripts" : {
44
- "build-md" : " remark . --quiet --frail" ,
38
+ "build-md" : " remark . --quiet --frail --output " ,
45
39
"build-bundle" : " browserify index.js --bare -s hastUtilParseSelector > hast-util-parse-selector.js" ,
46
40
"build-mangle" : " esmangle hast-util-parse-selector.js > hast-util-parse-selector.min.js" ,
47
41
"build" : " npm run build-md && npm run build-bundle && npm run build-mangle" ,
55
49
"ignores" : [
56
50
" hast-util-parse-selector.js"
57
51
]
52
+ },
53
+ "remarkConfig" : {
54
+ "presets" : " wooorm"
58
55
}
59
56
}
Original file line number Diff line number Diff line change @@ -4,15 +4,12 @@ Parse a simple CSS selector to a HAST node.
4
4
5
5
## Installation
6
6
7
- [ npm] [ npm-install ] :
7
+ [ npm] [ ] :
8
8
9
9
``` bash
10
10
npm install hast-util-parse-selector
11
11
```
12
12
13
- ** hast-util-parse-selector** is also available as an AMD, CommonJS, and globals
14
- module, [ uncompressed and compressed] [ releases ] .
15
-
16
13
## Usage
17
14
18
15
``` javascript
@@ -36,12 +33,15 @@ Yields:
36
33
37
34
Parse a CSS ` selector ` to a [ HAST] [ ] [ node] [ hast-node ] .
38
35
39
- ** selector** (` string ` , optional). Can contain a tag-name (` foo ` ),
40
- classes (` .bar ` ), and an ID (` #baz ` ).
41
- Multiple classes are allowed. Uses the last ID if multiple IDs are
42
- found.
36
+ ###### ` selector `
37
+
38
+ ` string ` , optional — Can contain a tag-name (` foo ` ), classes (` .bar ` ),
39
+ and an ID (` #baz ` ). Multiple classes are allowed. Uses the last ID if
40
+ multiple IDs are found.
43
41
44
- ** Returns** : [ ` Node ` ] [ hast-node ] — A HAST node.
42
+ ###### Returns
43
+
44
+ [ ` Node ` ] [ hast-node ] .
45
45
46
46
## License
47
47
57
57
58
58
[ codecov ] : https://codecov.io/github/wooorm/hast-util-parse-selector
59
59
60
- [ npm-install ] : https://docs.npmjs.com/cli/install
61
-
62
- [ releases ] : https://github.com/wooorm/hast-util-parse-selector/releases
60
+ [ npm ] : https://docs.npmjs.com/cli/install
63
61
64
62
[ license ] : LICENSE
65
63
You can’t perform that action at this time.
0 commit comments