@@ -39,12 +39,12 @@ function match(query, node, schema) {
3939 return true
4040}
4141
42- /* [attr] */
42+ // ` [attr]`
4343function exists ( query , node , info ) {
4444 return has ( node , info . property )
4545}
4646
47- /* [attr=value] */
47+ // ` [attr=value]`
4848function exact ( query , node , info ) {
4949 if ( ! has ( node , info . property ) ) {
5050 return false
@@ -53,7 +53,7 @@ function exact(query, node, info) {
5353 return normalizeValue ( node . properties [ info . property ] , info ) === query . value
5454}
5555
56- /* [attr~=value] */
56+ // ` [attr~=value]`
5757function spaceSeparatedList ( query , node , info ) {
5858 var val
5959
@@ -63,8 +63,8 @@ function spaceSeparatedList(query, node, info) {
6363
6464 val = node . properties [ info . property ]
6565
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.
6868 if (
6969 typeof val === 'object' &&
7070 ! info . commaSeparated &&
@@ -73,12 +73,12 @@ function spaceSeparatedList(query, node, info) {
7373 return true
7474 }
7575
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.
7878 return normalizeValue ( val , info ) === query . value
7979}
8080
81- /* [attr|=value] */
81+ // ` [attr|=value]`
8282function exactOrPrefix ( query , node , info ) {
8383 var value
8484
@@ -95,7 +95,7 @@ function exactOrPrefix(query, node, info) {
9595 )
9696}
9797
98- /* [attr^=value] */
98+ // ` [attr^=value]`
9999function begins ( query , node , info ) {
100100 var value
101101
@@ -108,7 +108,7 @@ function begins(query, node, info) {
108108 return value . slice ( 0 , query . value . length ) === query . value
109109}
110110
111- /* [attr$=value] */
111+ // ` [attr$=value]`
112112function ends ( query , node , info ) {
113113 if ( ! has ( node , info . property ) ) {
114114 return false
@@ -121,7 +121,7 @@ function ends(query, node, info) {
121121 )
122122}
123123
124- /* [attr*=value] */
124+ // ` [attr*=value]`
125125function contains ( query , node , info ) {
126126 if ( ! has ( node , info . property ) ) {
127127 return false
@@ -139,7 +139,7 @@ function unknownOperator(query) {
139139 throw new Error ( 'Unknown operator `' + query . operator + '`' )
140140}
141141
142- /* Stringify a hast value back to its HTML form. */
142+ // Stringify a hast value back to its HTML form.
143143function normalizeValue ( value , info ) {
144144 if ( typeof value === 'number' ) {
145145 value = String ( value )
0 commit comments