summaryrefslogtreecommitdiff
path: root/tests/lexers/html+ng2
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lexers/html+ng2')
-rw-r--r--tests/lexers/html+ng2/example.txt137
1 files changed, 137 insertions, 0 deletions
diff --git a/tests/lexers/html+ng2/example.txt b/tests/lexers/html+ng2/example.txt
new file mode 100644
index 00000000..75b4b633
--- /dev/null
+++ b/tests/lexers/html+ng2/example.txt
@@ -0,0 +1,137 @@
+---input---
+<div>
+ <p>{{order.DueTime | date:'d. MMMM yyyy HH:mm'}}</p>
+ <p>Status: {{order.OrderState}}</p>
+ <button (click)="deleteOrder()" *ngIf="cancelable" [value]="test" [(twoWayTest)]="foo.bar">Remove</button>
+ <ul>
+ <li *ngFor="#meal of order.Positions">
+ {{meal.Name}}
+ </li>
+ </ul>
+ <p>Preis: <b>{{order.TotalPrice | currency:'EUR':true:'1.2-2'}}</b></p>
+</div>
+
+---tokens---
+'<' Punctuation
+'div' Name.Tag
+'>' Punctuation
+'\n ' Text
+'<' Punctuation
+'p' Name.Tag
+'>' Punctuation
+'{{' Comment.Preproc
+'order' Name.Variable
+'.DueTime' Name.Variable
+' | ' Text
+'date' Name.Variable
+":'d. MMMM yyyy HH:mm'" Literal.String.Single
+'}}' Comment.Preproc
+'<' Punctuation
+'/' Punctuation
+'p' Name.Tag
+'>' Punctuation
+'\n ' Text
+'<' Punctuation
+'p' Name.Tag
+'>' Punctuation
+'Status: ' Text
+'{{' Comment.Preproc
+'order' Name.Variable
+'.OrderState' Name.Variable
+'}}' Comment.Preproc
+'<' Punctuation
+'/' Punctuation
+'p' Name.Tag
+'>' Punctuation
+'\n ' Text
+'<' Punctuation
+'button' Name.Tag
+' ' Text
+'(' Punctuation
+'click' Name.Attribute
+')' Punctuation
+'=' Operator
+'"deleteOrder()"' Literal.String
+' ' Text
+'*' Punctuation
+'ngIf' Name.Attribute
+'=' Operator
+'"cancelable"' Literal.String
+' ' Text
+'[' Punctuation
+'value' Name.Attribute
+']' Punctuation
+'=' Operator
+'"test"' Literal.String
+' ' Text
+'[(' Punctuation
+'twoWayTest' Name.Attribute
+')]' Punctuation
+'=' Operator
+'"foo.bar"' Literal.String
+'>' Punctuation
+'Remove' Text
+'<' Punctuation
+'/' Punctuation
+'button' Name.Tag
+'>' Punctuation
+'\n ' Text
+'<' Punctuation
+'ul' Name.Tag
+'>' Punctuation
+'\n ' Text
+'<' Punctuation
+'li' Name.Tag
+' ' Text
+'*' Punctuation
+'ngFor' Name.Attribute
+'=' Operator
+'"#meal of order.Positions"' Literal.String
+'>' Punctuation
+'\n ' Text
+'{{' Comment.Preproc
+'meal' Name.Variable
+'.Name' Name.Variable
+'}}' Comment.Preproc
+'\n ' Text
+'<' Punctuation
+'/' Punctuation
+'li' Name.Tag
+'>' Punctuation
+'\n ' Text
+'<' Punctuation
+'/' Punctuation
+'ul' Name.Tag
+'>' Punctuation
+'\n ' Text
+'<' Punctuation
+'p' Name.Tag
+'>' Punctuation
+'Preis: ' Text
+'<' Punctuation
+'b' Name.Tag
+'>' Punctuation
+'{{' Comment.Preproc
+'order' Name.Variable
+'.TotalPrice' Name.Variable
+' | ' Text
+'currency' Name.Variable
+":'EUR'" Literal.String.Single
+':true' Literal.String.Boolean
+":'1.2-2'" Literal.String.Single
+'}}' Comment.Preproc
+'<' Punctuation
+'/' Punctuation
+'b' Name.Tag
+'>' Punctuation
+'<' Punctuation
+'/' Punctuation
+'p' Name.Tag
+'>' Punctuation
+'\n' Text
+
+'<' Punctuation
+'/' Punctuation
+'div' Name.Tag
+'>' Punctuation
+'\n' Text