Skip to content

Commit c7ac32c

Browse files
committed
fix(pat depends): Allow input names with colons in the parser, as used in Plone.
1 parent 9957b15 commit c7ac32c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/lib/depends_parse.pegjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ IdentifierPart
9595
/ "_"
9696
/ "-"
9797
/ "."
98+
/ ":"
9899
/ UnicodeCombiningMark
99100
/ UnicodeDigit
100101
/ UnicodeConnectorPunctuation

tests/specs/lib/depends_parse.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ define(["pat-depends_parse"], function(parser) {
7070
input: "foo-bar"});
7171
});
7272

73+
it("Colons in name", function () {
74+
var ast = parser.parse("foo:bar");
75+
expect(ast).toEqual({type: "truthy",
76+
input: "foo:bar"});
77+
});
78+
7379
it("Single quoted value", function() {
7480
var ast = parser.parse("foo='bar buz'");
7581
expect(ast).toEqual({type: "comparison",

0 commit comments

Comments
 (0)