backbone-query-parameters icon indicating copy to clipboard operation
backbone-query-parameters copied to clipboard

Problem with optional path parameter names

Open alexbrad opened this issue 12 years ago • 0 comments

When using optional path parameters with Backbone.Router.namedParameters = true, the extracted parameter name includes the trailing ')' or the starting '(' of a subsequent optional paramter.

The problem can be solved by changing the namedPattern regexp from /:*/g to /:*/g

All tests pass after the change (except test 263, which was failing anyway).

Should I make a pull request, considering that the change is extremely simple?

alexbrad avatar Apr 17 '13 13:04 alexbrad