angular/angular.js — pull request #4344 by purcell (2013-10-09 09:52:28+00:00)
Title: fix(input): make ngList honor custom separators

Remove support for regexp separators, and correctly use custom separator when formatting values into the control.

Follows @IgorMinar's suggestions from #2561, as suggested by @petebacondarwin in #4008.

The existing "should allow custom separator" test was incomplete, since it did not check that the custom separator was used to format the values in the control.

Notes:

1. The behaviour is still not perfect, because when using a custom separator containing whitespace, e.g. `" | "`, the spaces should be rendered into the control. Even with my changes, this is not the case, because the `attr.ngList` value has already been trimmed prior to being passed to the directive. I have omitted the failing test for this case. How would we handle this?

2. The whitespace behaviour should arguably be affected by the value of `ng-trim` where present: I'd suggest that when it is present, the values between the separators should not be trimmed.