1
1
/**
2
- * @license r.js 2.1.7 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
2
+ * @license r.js 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
3
3
* Available via the MIT or new BSD license.
4
4
* see: http://github.com/jrburke/requirejs for details
5
5
*/
@@ -20,7 +20,7 @@ var requirejs, require, define, xpcUtil;
20
20
(function (console, args, readFileFunc) {
21
21
var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
22
22
nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode, Cc, Ci,
23
- version = '2.1.7 ',
23
+ version = '2.1.8 ',
24
24
jsSuffixRegExp = /\.js$/,
25
25
commandOption = '',
26
26
useLibLoaded = {},
@@ -232,7 +232,7 @@ var requirejs, require, define, xpcUtil;
232
232
}
233
233
234
234
/** vim: et:ts=4:sw=4:sts=4
235
- * @license RequireJS 2.1.7 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
235
+ * @license RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
236
236
* Available via the MIT or new BSD license.
237
237
* see: http://github.com/jrburke/requirejs for details
238
238
*/
@@ -245,7 +245,7 @@ var requirejs, require, define, xpcUtil;
245
245
(function (global) {
246
246
var req, s, head, baseElement, dataMain, src,
247
247
interactiveScript, currentlyAddingScript, mainScript, subPath,
248
- version = '2.1.7 ',
248
+ version = '2.1.8 ',
249
249
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
250
250
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
251
251
jsSuffixRegExp = /\.js$/,
@@ -21760,7 +21760,10 @@ define('parse', ['./esprimaAdapter', 'lang'], function (esprima, lang) {
21760
21760
parse.nodeToString = function (contents, node) {
21761
21761
var loc = node.loc,
21762
21762
lines = contents.split('\n'),
21763
- preamble = lines.slice(0, loc.start.line - 1).join('\n') + '\n' +
21763
+ firstLine = loc.start.line > 1 ?
21764
+ lines.slice(0, loc.start.line - 1).join('\n') + '\n' :
21765
+ '',
21766
+ preamble = firstLine +
21764
21767
lines[loc.start.line - 1].substring(0, loc.start.column),
21765
21768
extracted = lines[loc.start.line - 1].substring(loc.start.column) +
21766
21769
'\n' +
0 commit comments