forked from requirejs/requirejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commentRegExp faster and matches more
- Loading branch information
Showing
5 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,29 @@ | ||
define(function (require) { | ||
//Tests detecting a full URL dependency inside simplified wrapper. | ||
//Test a full URL dependency inside simplified wrapper. | ||
require('https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'); | ||
|
||
//Test protocol relative URL. | ||
require('//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js'); | ||
|
||
var s = '<img src="//www.example.com/loading.gif"/>'; var util = require('util'); | ||
|
||
var t = '<img src=//www.example.com/loading.gif/>'; var util2 = require('util2'); | ||
|
||
//Make sure that this does not match, a string with no semicolon | ||
//after it, but with a line break before a commented out require. | ||
var something = 'something' | ||
//require('bad'); | ||
|
||
//-------- | ||
//This will match if this comment removed to here: var something = 'something'// require('bad'); | ||
//-------- | ||
|
||
function noop() {}; | ||
|
||
return { | ||
isFunction: jQuery.isFunction(noop) | ||
isFunction: jQuery.isFunction(noop), | ||
swfobject: swfobject, | ||
util: util, | ||
util2: util2 | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
define({ | ||
name: 'util' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
define({ | ||
name: 'util2' | ||
}); |