Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit c1d034a

Browse files
author
e2tha-e
committed
comment and character escape update
1 parent 1e94f31 commit c1d034a

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

builder/pattern_engines/util_mustache.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,22 @@
3434
partialsStr += '(\\:[\\w\\-]+(\\|[\\w\\-]+)*)?';
3535
// end 2nd exterior group
3636
// begin 3rd exterior group, an optional group
37-
// look for an opening parenthesis, followed by >=0 whitespaces,
38-
// followed by >=0 whitespaces, followed by a colon, followed by >=0 whitespaces
39-
partialsStr += '(\\(\\s*\\w+\\s*:\\s*';
37+
// look for an opening parenthesis, followed by >=0 whitespaces, followed by
38+
// >0 alphanumerics, followed by >=0 whitespaces, followed by a colon,
39+
// followed by >=0 whitespaces
40+
partialsStr += '(\\(\\s*\\w+\\s*\\:\\s*';
4041
// followed by an interior group
4142
// comprising a single quote, followed by an interior group comprising
42-
// >0 characters that are not single quotes or backslashes
43-
// or >0 character pairs comprising a backlash, followed by any character
44-
// look for a single quote to termination this pattern
43+
// >=0 characters that are not single quotes or backslashes
44+
// or >=0 character pairs comprising a backlash, followed by any character.
45+
// look for a single quote to terminate this pattern
4546
partialsStr += '(\'([^\'\\\\]|\\\\.)*\'';
4647
// if the pattern wrapped in single quotes is not found, look for one wrapped
4748
// in double quotes
4849
// look for a double quote, followed by an interior group comprising
49-
// >0 characters that are not double quotes or backslashes
50-
// or >0 character pairs comprising a backlash, followed by any character
51-
// look for a double quote to termination this pattern
50+
// >=0 characters that are not double quotes or backslashes
51+
// or >=0 character pairs comprising a backlash, followed by any character.
52+
// look for a double quote to terminate this pattern
5253
partialsStr += '|"([^"\\\\]|\\\\.)*")';
5354
// look for a closing parenthesis
5455
partialsStr += '\\))?';

0 commit comments

Comments
 (0)