Skip to content

Commit

Permalink
Glimmer attributes will not auto-quote
Browse files Browse the repository at this point in the history
  • Loading branch information
John Ratcliff committed Dec 22, 2017
1 parent 173ad4c commit 36dca44
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pegjs/html/boolean-attr.pegjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../key.pegjs" as key
@import "../non-glimmer-key.pegjs" as key

start = booleanAttribute

Expand Down
6 changes: 6 additions & 0 deletions lib/pegjs/non-glimmer-key.pegjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import "./nmchar.pegjs" as nmchar

start = key

key "Key"
= $((nmchar / ':' / '.')*)
8 changes: 8 additions & 0 deletions tests/integration/glimmer-component-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ test("basic syntax with legacy quoting", function(){
});
});

test("boolean attribute passed in as component input", function() {
var emblem = w(
"% my-component @multiselect=false"
);
compilesTo(emblem,
'<my-component @multiselect={{false}}></my-component>');
});

test("names with :", function(){
var emblem = w(
"% inputs:my-component @value=foo"
Expand Down

0 comments on commit 36dca44

Please sign in to comment.