@@ -39,12 +39,12 @@ function match(query, node, schema) {
39
39
return true
40
40
}
41
41
42
- /* [attr] */
42
+ // ` [attr]`
43
43
function exists ( query , node , info ) {
44
44
return has ( node , info . property )
45
45
}
46
46
47
- /* [attr=value] */
47
+ // ` [attr=value]`
48
48
function exact ( query , node , info ) {
49
49
if ( ! has ( node , info . property ) ) {
50
50
return false
@@ -53,7 +53,7 @@ function exact(query, node, info) {
53
53
return normalizeValue ( node . properties [ info . property ] , info ) === query . value
54
54
}
55
55
56
- /* [attr~=value] */
56
+ // ` [attr~=value]`
57
57
function spaceSeparatedList ( query , node , info ) {
58
58
var val
59
59
@@ -63,8 +63,8 @@ function spaceSeparatedList(query, node, info) {
63
63
64
64
val = node . properties [ info . property ]
65
65
66
- /* If this is a comma-separated list, and the query is contained in it,
67
- * return true. */
66
+ // If this is a comma-separated list, and the query is contained in it, return
67
+ // true.
68
68
if (
69
69
typeof val === 'object' &&
70
70
! info . commaSeparated &&
@@ -73,12 +73,12 @@ function spaceSeparatedList(query, node, info) {
73
73
return true
74
74
}
75
75
76
- /* For all other values (including comma-separated lists),
77
- * return whether this is an exact match. */
76
+ // For all other values (including comma-separated lists), return whether this
77
+ // is an exact match.
78
78
return normalizeValue ( val , info ) === query . value
79
79
}
80
80
81
- /* [attr|=value] */
81
+ // ` [attr|=value]`
82
82
function exactOrPrefix ( query , node , info ) {
83
83
var value
84
84
@@ -95,7 +95,7 @@ function exactOrPrefix(query, node, info) {
95
95
)
96
96
}
97
97
98
- /* [attr^=value] */
98
+ // ` [attr^=value]`
99
99
function begins ( query , node , info ) {
100
100
var value
101
101
@@ -108,7 +108,7 @@ function begins(query, node, info) {
108
108
return value . slice ( 0 , query . value . length ) === query . value
109
109
}
110
110
111
- /* [attr$=value] */
111
+ // ` [attr$=value]`
112
112
function ends ( query , node , info ) {
113
113
if ( ! has ( node , info . property ) ) {
114
114
return false
@@ -121,7 +121,7 @@ function ends(query, node, info) {
121
121
)
122
122
}
123
123
124
- /* [attr*=value] */
124
+ // ` [attr*=value]`
125
125
function contains ( query , node , info ) {
126
126
if ( ! has ( node , info . property ) ) {
127
127
return false
@@ -139,7 +139,7 @@ function unknownOperator(query) {
139
139
throw new Error ( 'Unknown operator `' + query . operator + '`' )
140
140
}
141
141
142
- /* Stringify a hast value back to its HTML form. */
142
+ // Stringify a hast value back to its HTML form.
143
143
function normalizeValue ( value , info ) {
144
144
if ( typeof value === 'number' ) {
145
145
value = String ( value )
0 commit comments