From 9a4cfc05638bce6f8028b47f72b7a636a81bf038 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Tue, 17 Oct 2017 01:14:51 -0400 Subject: [PATCH] fix ids again --- jael/lib/src/text/scanner.dart | 2 +- jael/pubspec.yaml | 2 +- jael/test/render/render_test.dart | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/jael/lib/src/text/scanner.dart b/jael/lib/src/text/scanner.dart index 11e795e8..1eff17f8 100644 --- a/jael/lib/src/text/scanner.dart +++ b/jael/lib/src/text/scanner.dart @@ -3,7 +3,7 @@ import '../ast/ast.dart'; final RegExp _whitespace = new RegExp(r'[ \n\r\t]+'); -final RegExp _id = new RegExp(r'(([A-Za-z][A-Za-z0-9]*-)*([A-Za-z][A-Za-z0-9]*))'); +final RegExp _id = new RegExp(r'(([A-Za-z][A-Za-z0-9_]*-)*([A-Za-z][A-Za-z0-9_]*))'); final RegExp _string1 = new RegExp( r"'((\\(['\\/bfnrt]|(u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])))|([^'\\]))*'"); final RegExp _string2 = new RegExp( diff --git a/jael/pubspec.yaml b/jael/pubspec.yaml index eacba15a..4116cde6 100644 --- a/jael/pubspec.yaml +++ b/jael/pubspec.yaml @@ -1,5 +1,5 @@ name: jael -version: 1.0.0-beta+2 +version: 1.0.0-beta+3 description: A simple server-side HTML templating engine for Dart. author: Tobe O homepage: https://github.com/angel-dart/jael/tree/master/jael diff --git a/jael/test/render/render_test.dart b/jael/test/render/render_test.dart index 5ff21424..4022f16e 100644 --- a/jael/test/render/render_test.dart +++ b/jael/test/render/render_test.dart @@ -10,6 +10,7 @@ main() {

Hello

+ '''; @@ -21,6 +22,7 @@ main() { try { document = jael.parseDocument(template, sourceUrl: 'test.jl'); scope = new SymbolTable(values: { + 'csrf_token': 'foo', 'profile': { 'avatar': 'thosakwe.png', } @@ -43,6 +45,7 @@ main() { Hello + '''