diff --git a/src/parser.coffee b/src/parser.coffee index 8b733dc..789ae22 100644 --- a/src/parser.coffee +++ b/src/parser.coffee @@ -361,7 +361,7 @@ module.exports = class Parser # [3] self closing? OPENING_TAG = /// ^ < - ([-A-Za-z0-9_]+) # tag name (captured) + ([-A-Za-z0-9_\.]+) # tag name (captured) ( (?:\s+[\w-]+ # attr name (?:\s*=\s* # equals and whitespace @@ -380,7 +380,7 @@ OPENING_TAG = /// ^ /// # [1] tag name -CLOSING_TAG = /^<\/([-A-Za-z0-9_]+)[^>]*>/ +CLOSING_TAG = /^<\/([-A-Za-z0-9_\.]+)[^>]*>/ # [0] attr=val # [1] attr diff --git a/test/output-testcases.txt b/test/output-testcases.txt index 85f6352..7d8d05b 100644 --- a/test/output-testcases.txt +++ b/test/output-testcases.txt @@ -501,3 +501,19 @@ tag with {{}} ##expected Person({"name": ({value: item, key, item})}) ##end + +##desc +tag with namespace +##input + +##expected +Something.Tag(null) +##end + +##desc +self closing tag with namespace +##input + +##expected +Something.Tag(null) +##end \ No newline at end of file