Skip to content

Commit 943a117

Browse files
committed
Fix typos
1 parent 567ceb0 commit 943a117

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/pseudo.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,16 @@ function match(query, node, index, parent, state) {
8989
}
9090

9191
function matches(query, node, index, parent, state) {
92+
var shallow = state.shallow
9293
var one = state.one
9394
var result
9495

96+
state.shallow = true
9597
state.one = true
9698

9799
result = Boolean(anything(query.value, node, state)[0])
98100

101+
state.shallow = shallow
99102
state.one = one
100103

101104
return result

test/matches.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ test('select.matches()', function(t) {
173173
st.end()
174174
})
175175

176-
t.test('attributes, existance: `[attr]`', function(st) {
176+
t.test('attributes, existence: `[attr]`', function(st) {
177177
st.ok(matches('[class]', h('.one')), 'true if attribute exists')
178178
st.notOk(matches('[for]', h('.one')), 'false if attribute does not exist')
179179
st.ok(
@@ -704,7 +704,7 @@ test('select.matches()', function(t) {
704704
)
705705
sst.ok(
706706
matches(pseudo + '(a, [title], .class)', h('div', {title: '1'})),
707-
'true if any matches (attribute existance)'
707+
'true if any matches (attribute existence)'
708708
)
709709
sst.notOk(
710710
matches(pseudo + '(a, [title], .class)', h('i')),
@@ -726,7 +726,7 @@ test('select.matches()', function(t) {
726726
)
727727
sst.notOk(
728728
matches(':not(a, [title], .class)', h('div', {title: '1'})),
729-
'false if any matches (attribute existance)'
729+
'false if any matches (attribute existence)'
730730
)
731731
sst.ok(
732732
matches(':not(a, [title], .class)', h('i')),

0 commit comments

Comments
 (0)