diff --git a/lib/pegjs/mustache/name-character.pegjs b/lib/pegjs/mustache/name-character.pegjs index 53f6d06..e74d8ea 100644 --- a/lib/pegjs/mustache/name-character.pegjs +++ b/lib/pegjs/mustache/name-character.pegjs @@ -1,7 +1,7 @@ start = newMustacheNameChar // a character that can be in a mustache name -newMustacheNameChar = [-_/A-Za-z0-9] / arrayIndex / '.' / '@' +newMustacheNameChar = [-_/A-Za-z0-9] / arrayIndex / '.' / '@' / '::' // Ember requires that array indexes have a . before them arrayIndex = '.[' newMustacheNameChar* ']' diff --git a/tests/integration/glimmer-component-test.js b/tests/integration/glimmer-component-test.js index dd5c279..8c3abdb 100644 --- a/tests/integration/glimmer-component-test.js +++ b/tests/integration/glimmer-component-test.js @@ -136,3 +136,11 @@ test('named block support', function() { compilesTo(emblem, '<@header as |@title|>Header {{title}}<@body>Body<@footer>Footer'); }); + +test('module namespaces', function() { + var emblem = w( + '% my-addon::foo' + ) + + compilesTo(emblem, ''); +}); diff --git a/tests/integration/mustaches-test.js b/tests/integration/mustaches-test.js index 5d3b900..5536adf 100644 --- a/tests/integration/mustaches-test.js +++ b/tests/integration/mustaches-test.js @@ -562,3 +562,11 @@ test('named block with block param', function() { compilesTo(emblem, '{{#x-layout as |@widget|}}{{#@widget as |a b c|}}Hi.{{/@widget}}{{/x-layout}}'); }); + +test('module namespaces', function() { + var emblem = w( + '= my-addon::foo' + ) + + compilesTo(emblem, '{{my-addon::foo}}'); +});