Skip to content

Commit

Permalink
Add support for named block syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Oct 20, 2018
1 parent 4b7a1cc commit 1407334
Show file tree
Hide file tree
Showing 2 changed files with 874 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/evented-tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default class EventedTokenizer {
this.transitionTo(TokenizerState.markupDeclarationOpen);
} else if (char === '/') {
this.transitionTo(TokenizerState.endTagOpen);
} else if (char === '@' || isAlpha(char)) {
} else if (char === '@' || char === ':' || isAlpha(char)) {
this.transitionTo(TokenizerState.tagName);
this.tagNameBuffer = '';
this.delegate.beginStartTag();
Expand Down Expand Up @@ -452,7 +452,7 @@ export default class EventedTokenizer {
endTagOpen() {
let char = this.consume();

if (char === '@' || isAlpha(char)) {
if (char === '@' || char === ':' || isAlpha(char)) {
this.transitionTo(TokenizerState.tagName);
this.tagNameBuffer = '';
this.delegate.beginEndTag();
Expand Down
Loading

0 comments on commit 1407334

Please sign in to comment.