Skip to content

Commit

Permalink
Merge pull request #329 from thec0keman/fix-mustache-spacing
Browse files Browse the repository at this point in the history
Fix mustache statements with interesting spacing
  • Loading branch information
John Ratcliff committed Jan 4, 2019
2 parents 5b3e1b7 + dde2aa0 commit dff8fc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parser.pegjs
Expand Up @@ -288,7 +288,7 @@ mustache
return [parsedMustacheOrBlock];
}

explicitMustache = e:equalSign mustacheTuple:mustacheOrBlock
explicitMustache = e:equalSign _ mustacheTuple:mustacheOrBlock
{
var mustache = mustacheTuple[0];
var block = mustacheTuple[1];
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/mustache/handlebars-expressions-test.js
Expand Up @@ -111,6 +111,10 @@ module('mustache: handlebars expressions', function (hooks) {
assert.compilesTo(emblem, '{{navigation/button-list}}');
});

test('explicit mustache with spacing issues', function(assert) {
assert.compilesTo('= link-to foo=bar', '{{link-to foo=bar}}');
});

test("should not kick in if preceded by equal sign", function (assert) {
const emblem = w(
"= SomeView"
Expand Down

0 comments on commit dff8fc6

Please sign in to comment.