mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-09 15:24:43 +00:00
fix($injector): more conservative annotation parsing
This commit is contained in:
parent
8cb9c99ec0
commit
d9eff86ef7
2 changed files with 2 additions and 2 deletions
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
|
var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
|
||||||
var FN_ARG_SPLIT = /,/;
|
var FN_ARG_SPLIT = /,/;
|
||||||
var FN_ARG = /^\s*(_?)(.+?)\1\s*$/;
|
var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
|
||||||
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
|
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
|
||||||
function annotate(fn) {
|
function annotate(fn) {
|
||||||
var $inject,
|
var $inject,
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ describe('injector', function() {
|
||||||
function $f_n0 /*
|
function $f_n0 /*
|
||||||
*/(
|
*/(
|
||||||
$a, // x, <-- looks like an arg but it is a comment
|
$a, // x, <-- looks like an arg but it is a comment
|
||||||
b_, /* z, <-- looks like an arg but it is a
|
b_ , /* z, <-- looks like an arg but it is a
|
||||||
multi-line comment
|
multi-line comment
|
||||||
function (a, b) {}
|
function (a, b) {}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue