Skip to content

Commit 42662ba

Browse files
committed
comments on relative_attr regexps
1 parent 238e248 commit 42662ba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib/relative_attr.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@
99

1010
'use strict';
1111

12-
12+
// ASCEND: chop off the last nesting level - either [<n>] or .<key> - to ascend
13+
// the attribute tree. the remaining attrString is in match[1]
1314
var ASCEND = /^(.*)(\.[^\.\[\]]+|\[\d\])$/;
15+
16+
// SIMPLEATTR: is this an un-nested attribute? (no dots or brackets)
1417
var SIMPLEATTR = /^[^\.\[\]]+$/;
18+
1519
/*
1620
* calculate a relative attribute string, similar to a relative path
1721
*

0 commit comments

Comments
 (0)