You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
As of 1.2.6, the parser accepts multiline string in ng-repeat. However, the same does not exist for ng-options in elements. The current regex for matching ng-options is:
var NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/
Following the same pattern to fix #5000, the new regex could be:
var NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\r\n\s\S]*?)(?:\s+track\s+by\s+(.*?))?$/
In the above, [\r\n\s\S] is added after in\s+(, replacing the . there.
However, I have not tested the above change.
There may be other elements that also support iteration and don't allow multiline strings that I missed too.