mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Merge pull request #49 from seangates/patch-1
Allowing complex var names;
This commit is contained in:
commit
ec772e116b
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
'use strict';
|
||||
var varNameRegExp = /^[A-Za-z_][A-Za-z0-9_\.]*$/;
|
||||
// var varNameRegExp = /^[A-Za-z_][A-Za-z0-9_\.]*$/;
|
||||
function AssignNode(props) {
|
||||
AssignNode.$super.call(this);
|
||||
if (props) {
|
||||
@ -27,9 +27,6 @@ AssignNode.prototype = {
|
||||
var value = this.getProperty('value');
|
||||
if (!varName) {
|
||||
this.addError('"var" attribute is required');
|
||||
} else if (!varNameRegExp.test(varName)) {
|
||||
this.addError('Invalid variable name of "' + varName + '"');
|
||||
varName = null;
|
||||
}
|
||||
if (!value) {
|
||||
this.addError('"value" attribute is required');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user