mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
lodash: Fix post-compile.js VERSION detection to allow newlines. [jddalton]
Former-commit-id: 2e0d342cf66c4507a2956eeac912333cfdca5817
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
function postprocess(source) {
|
||||
// set the version
|
||||
var license = licenseTemplate.replace('@VERSION', (/VERSION:([\'"])(.*?)\1/).exec(source).pop());
|
||||
var license = licenseTemplate.replace('@VERSION', (/VERSION\s*:\s*([\'"])(.*?)\1/).exec(source).pop());
|
||||
// move vars exposed by Closure Compiler into the IIFE
|
||||
source = source.replace(/^([^(\n]+)\s*(\(function[^)]+\){)/, '$2$1');
|
||||
// use double quotes consistently
|
||||
|
||||
Reference in New Issue
Block a user