mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Simplify sourceURL code and ensure source maps work avoid compat issues.
Former-commit-id: 5b64703eaebc65c443d6b9d3699d448c253e70c1
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
|
||||
// add trailing semicolon
|
||||
if (source) {
|
||||
source = source.replace(/[\s;]*(\n\/\/.+)?$/, ';$1');
|
||||
source = source.replace(/[\s;]*?(\s*\/\/.*\s*|\s*\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/\s*)*$/, ';$1');
|
||||
}
|
||||
// exit early if version snippet isn't found
|
||||
var snippet = /VERSION\s*[=:]\s*([\'"])(.*?)\1/.exec(source);
|
||||
|
||||
Reference in New Issue
Block a user