Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Update binding expression regex to full Polymer/polymer regex (Fixes #113)#117

Open
jonvuri wants to merge 2 commits intogooglearchive:masterfrom
jonvuri:master
Open

Update binding expression regex to full Polymer/polymer regex (Fixes #113)#117
jonvuri wants to merge 2 commits intogooglearchive:masterfrom
jonvuri:master

Conversation

@jonvuri
Copy link

@jonvuri jonvuri commented Apr 18, 2016

Fixes #113

We grab the binding regex from https://github.com/Polymer/polymer/blob/d385873e3696aade3d122cb1c28f0ce8f6af4b35/src/lib/annotations/annotations.html#L92-L109 and modify it slightly to have only one capture group for the binding (which is what extractBindingExpression expects), and to handle the native event binding delimiter if present.

Big thanks to @TimvdLippe for help with the native binding expression and other feedback!

Among other things, the main thing this fixes is the greedy handling of binding expressions on the same line. This could also be solved by simply making the original inline regexes non-greedy, but this is a more thorough solution to handle most binding expression structures.

Also fixed two minor issues with the unit tests - those are the first two commits in this PR.

@garlicnation
Copy link
Contributor

@jrajav Can you rebase this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error with compound binding containing 2 property bindings

2 participants

Comments