Skip to content

Commit

Permalink
fix: correct a spelling mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Jan 21, 2017
1 parent 257b5e1 commit 1382f37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/grammar.ne
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ classParameter ->

pseudoClassSelector ->
":" pseudoClassSelectorName {% d => ({type: 'pseudoClassSelector', name: d[1]}) %}
| ":" pseudoClassSelectorName "(" classParameters ")" {% d => ({type: 'pseudoClassSelector', name: d[1], paramters: d[3]}) %}
| ":" pseudoClassSelectorName "(" classParameters ")" {% d => ({type: 'pseudoClassSelector', name: d[1], parameters: d[3]}) %}

pseudoClassSelectorName ->
[a-zA-Z] [a-zA-Z0-9-_]:+ {% d => d[0] + d[1].join('') %}
Expand Down
12 changes: 6 additions & 6 deletions test/selectors/pseudoClassSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ for (const unquotedValue of unquotedValues) {
parse(':not(' + unquotedValue + ')')[0].body[0],
{
name: 'not',
paramters: [
parameters: [
unquotedValue
],
type: 'pseudoClassSelector'
Expand Down Expand Up @@ -94,7 +94,7 @@ for (const quotedValueSingleQuotes of quotedValuesSingleQuotes) {
parse(':not(' + quotedValueSingleQuotes + ')')[0].body[0],
{
name: 'not',
paramters: [
parameters: [
quotedValueSingleQuotes.replace('\\\'', '\'').slice(1, -1)
],
type: 'pseudoClassSelector'
Expand All @@ -120,7 +120,7 @@ for (const quotedValueDoubleQuotes of quotedValuesDoubleQuotes) {
parse(':not(' + quotedValueDoubleQuotes + ')')[0].body[0],
{
name: 'not',
paramters: [
parameters: [
quotedValueDoubleQuotes.replace('\\"', '"').slice(1, -1)
],
type: 'pseudoClassSelector'
Expand All @@ -129,7 +129,7 @@ for (const quotedValueDoubleQuotes of quotedValuesDoubleQuotes) {
});
}

const multipleParamters = [
const multipleParameters = [
'foo,bar,baz',
'foo, bar, baz',
'"foo", "bar", "baz"',
Expand All @@ -138,13 +138,13 @@ const multipleParamters = [
"'foo', 'bar', 'baz'"
];

for (const multipleParamter of multipleParamters) {
for (const multipleParamter of multipleParameters) {
test('valid :not(' + multipleParamter + ')', (t): void => {
t.deepEqual(
parse(':not(' + multipleParamter + ')')[0].body[0],
{
name: 'not',
paramters: [
parameters: [
'foo',
'bar',
'baz'
Expand Down

0 comments on commit 1382f37

Please sign in to comment.