mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Correct regexp in build/pre-compile.js that matches string literals.
Former-commit-id: 0ae905b74103df321f997e1d83ac5ce54a17e552
This commit is contained in:
@@ -293,7 +293,7 @@
|
|||||||
source = source.replace("result[length]['value']", 'result[length].value');
|
source = source.replace("result[length]['value']", 'result[length].value');
|
||||||
|
|
||||||
// remove whitespace from string literals
|
// remove whitespace from string literals
|
||||||
source = source.replace(/^((?:[ "'\w]+:)? *)"[^"\n\\]*(?:\\.[^"\n\\]*)*"|'[^'\n\\]*(?:\\.[^'\n\\]*)*'/gm, function(string, left) {
|
source = source.replace(/^((?:[ "'\w]+:)? *)"[^"\n\\]*?(?:\\.[^"\n\\]*?)*"|'[^'\n\\]*?(?:\\.[^'\n\\]*?)*'/gm, function(string, left) {
|
||||||
// clip after an object literal property name or leading spaces
|
// clip after an object literal property name or leading spaces
|
||||||
if (left) {
|
if (left) {
|
||||||
string = string.slice(left.length);
|
string = string.slice(left.length);
|
||||||
|
|||||||
Reference in New Issue
Block a user