mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
replace smart-quotes with regular quotes
This commit is contained in:
parent
7d4aee31bb
commit
fd6e5e3f31
3 changed files with 11 additions and 2 deletions
5
gdocs.js
5
gdocs.js
|
|
@ -64,6 +64,11 @@ function download(name, url) {
|
|||
// strip out all text annotations
|
||||
data = data.replace(/\[\w{1,3}\]/mg, '');
|
||||
|
||||
// fix smart-quotes
|
||||
data = data.replace(/[“”]/g, '"');
|
||||
data = data.replace(/[‘’]/g, "'");
|
||||
|
||||
|
||||
data = data + '\n';
|
||||
fs.writeFileSync('docs/' + name, reflow(data, 100));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ function angularServiceInject(name, fn, inject, eager) {
|
|||
* extracting all arguments which start with $ or end with _ as the
|
||||
* injection names.
|
||||
*/
|
||||
var FN_ARGS = /^function [^\(]*\(([^\)]*)\)/;
|
||||
var FN_ARGS = /^function\s*[^\(]*\(([^\)]*)\)/;
|
||||
var FN_ARG_SPLIT = /,/;
|
||||
var FN_ARG = /^\s*(((\$?).+?)(_?))\s*$/;
|
||||
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
|
||||
|
|
|
|||
|
|
@ -65,11 +65,15 @@ describe('injector', function(){
|
|||
fn.$inject = ['a'];
|
||||
expect(injectionArgs(fn)).toBe(fn.$inject);
|
||||
expect(injectionArgs(function(){})).toEqual([]);
|
||||
expect(injectionArgs(function (){})).toEqual([]);
|
||||
expect(injectionArgs(function (){})).toEqual([]);
|
||||
expect(injectionArgs(function /* */ (){})).toEqual([]);
|
||||
});
|
||||
|
||||
it('should create $inject', function(){
|
||||
// keep the multi-line to make sure we can handle it
|
||||
function $f_n0(
|
||||
function $f_n0 /*
|
||||
*/(
|
||||
$a, // x, <-- looks like an arg but it is a comment
|
||||
b_, /* z, <-- looks like an arg but it is a
|
||||
multi-line comment
|
||||
|
|
|
|||
Loading…
Reference in a new issue