diff --git a/syntaxes/html.json b/syntaxes/html.json
index f88b123c..2d07c93b 100644
--- a/syntaxes/html.json
+++ b/syntaxes/html.json
@@ -373,7 +373,7 @@
}
},
"tag-aurelia-containerless-attribute" : {
- "match": "(containerless)( |>)",
+ "match": "(containerless)(?= |>)",
"captures": {
"1": {
"name": "containerless.attribute.html.au"
@@ -381,7 +381,7 @@
}
},
"tag-aurelia-compile-spy-attribute" : {
- "match": "(compile-spy)( |>)",
+ "match": "(compile-spy)(?= |>)",
"captures": {
"1": {
"name": "compile-spy.attribute.html.au"
@@ -389,7 +389,7 @@
}
},
"tag-aurelia-view-spy-attribute" : {
- "match": "(view-spy)( |>)",
+ "match": "(view-spy)(?= |>)",
"captures": {
"1": {
"name": "view-spy.attribute.html.au"
diff --git a/test/syntax.html/compile-spy.test.ts b/test/syntax.html/compile-spy.test.ts
index 64789b40..f980c9c0 100644
--- a/test/syntax.html/compile-spy.test.ts
+++ b/test/syntax.html/compile-spy.test.ts
@@ -1,5 +1,5 @@
import { assert } from 'chai';
-import { getTokenOnCharRange, hasScope, tokenizeLine } from './test.utils';
+import { getTokenOnCharRange, hasScope, tokenizeLine, writeOut } from './test.utils';
describe('The Aurelia HTML syntax compile-spy attribute', () => {
@@ -47,7 +47,7 @@ describe('The Aurelia HTML syntax compile-spy attribute', () => {
});
- it('must not tokenize foo-containerles="" attribute', () => {
+ it('must not tokenize foo-compile-spy="" attribute', () => {
// arrange
let scope = 'compile-spy.attribute.html.au';
@@ -91,4 +91,20 @@ describe('The Aurelia HTML syntax compile-spy attribute', () => {
assert.isNotOk(hasScope(token.scopes, scope));
});
+
+ it('must tokenize compile-spy attribute', () => {
+
+ // arrange
+ let scope = 'compile-spy.attribute.html.au';
+
+ // act
+ let template = '';
+ let lineToken = tokenizeLine(template);
+
+ // assert
+ let token = getTokenOnCharRange(lineToken, 10, 21);
+ assert.isDefined(token);
+ assert.isOk(hasScope(token.scopes, scope));
+
+ });
});
diff --git a/test/syntax.html/containerless.test.ts b/test/syntax.html/containerless.test.ts
index 686c994a..c9bca9b3 100644
--- a/test/syntax.html/containerless.test.ts
+++ b/test/syntax.html/containerless.test.ts
@@ -91,4 +91,21 @@ describe('The Aurelia HTML syntax containerles attribute', () => {
assert.isNotOk(hasScope(token.scopes, scope));
});
+
+ it('must tokenize containerless attribute', () => {
+
+ // arrange
+ let scope = 'containerless.attribute.html.au';
+
+ // act
+ let template = '';
+ let lineToken = tokenizeLine(template);
+
+ // assert
+ let token = getTokenOnCharRange(lineToken, 10, 23);
+ assert.isDefined(token);
+ assert.isOk(hasScope(token.scopes, scope));
+
+ });
+
});
diff --git a/test/syntax.html/view-spy.test.ts b/test/syntax.html/view-spy.test.ts
index 1a4ed27c..9c617f02 100644
--- a/test/syntax.html/view-spy.test.ts
+++ b/test/syntax.html/view-spy.test.ts
@@ -91,4 +91,20 @@ describe('The Aurelia HTML syntax view-spy attribute', () => {
assert.isNotOk(hasScope(token.scopes, scope));
});
+
+ it('must tokenize compile-spy attribute', () => {
+
+ // arrange
+ let scope = 'view-spy.attribute.html.au';
+
+ // act
+ let template = '';
+ let lineToken = tokenizeLine(template);
+
+ // assert
+ let token = getTokenOnCharRange(lineToken, 10, 18);
+ assert.isDefined(token);
+ assert.isOk(hasScope(token.scopes, scope));
+
+ });
});