Unresolved backreference #156

Closed
blackmambahk opened this Issue Sep 5, 2012 · 2 comments

Projects

None yet

2 participants

@blackmambahk

This probably is nothing but just FYI:
The following line (jsrender line 26) gets flagged as an error in WebStorm's validator - the \8 at the end reports as 'Unresolved backreference', I guess it's because the first group is marked as non capturing i.e. "(?: ".

rPath = /^(?:null|true|false|\d[\d.]|([\w$]+|~([\w$]+)|#(view|([\w$]+))?)([\w$.]?)(?:[.]?)?|(['"]).*\8)$/g

If it's really a valid regex then I'll let WS know so they can fix the issue on their side.
Rob

Owner

Thanks for letting me know. The issue is (['"]).*\8) - which looks back to capture #8, which does not exist. (It used to be #8, and should have been changed to #7 since there are less captures now.). But it is all a non-issue for JsRender, since that captured back reference was no longer needed in the code at all, (which is why the error didn't cause a bug) and that whole captured group has been removed from the regex on the current version which will be uploaded soon. I'll close this issue when the new version is uploaded...

@BorisMoore BorisMoore added a commit that referenced this issue Dec 3, 2012
@BorisMoore Commit counter 22. Major update, including some BREAKING CHANGES, and…
… many

new features. More samples and documentation for new features will be added
incrementally in coming updates.

Among the changes:

Detailed APIs modified for consistent arguments and use of this
pointer, and for maximum extensibility. See updated samples for usage...

Compiled templates restructured for easier debugging.

View object restructured for clarity.

View now has a type property, e.g. type="item"
Only "item" views have index properties, but to get the index from a nested
view use view.get("item").index.

nodes collection on a view is now a function, view.nodes().

Settings grouped onto a $.views.settings object.
View navigation features improved, with view.get(...) and $.view(elem, ...)
tagCtx object provides improved access to the args and properties of a tag
 invocation.

Adding resources (helpers, converters, tags, etc) to a template now supported
by passing parent template to API. e.g. $.tags({...}, parentTemplate).
Many improvements to custom tags, - used also as part of JsViews integration
for new JsViews Tag Controls. (Instantiation of tags as control instances).

Template inclusion now supported with simpler syntax {{for tmpl=.../))

Fixes for issues #169, #162, #157, #156, #155, #153, #145
69ce6ce
Owner

This has been fixed in commit 22.

@BorisMoore BorisMoore closed this Dec 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment