webpack-sources
Advanced tools
Comparing version 3.2.2 to 3.2.3
@@ -272,5 +272,4 @@ /* | ||
// Insert replacement content splitted into chunks by lines | ||
const regexp = /[^\n]+\n?|\n/g; | ||
const { content, name } = repls[i]; | ||
let match = regexp.exec(content); | ||
let matches = splitIntoLines(content); | ||
let replacementNameIndex = nameIndex; | ||
@@ -286,4 +285,4 @@ if (sourceIndex >= 0 && name) { | ||
} | ||
while (match !== null) { | ||
const contentLine = match[0]; | ||
for (let m = 0; m < matches.length; m++) { | ||
const contentLine = matches[m]; | ||
onChunk( | ||
@@ -305,4 +304,3 @@ contentLine, | ||
match = regexp.exec(content); | ||
if (match === null && !contentLine.endsWith("\n")) { | ||
if (m === matches.length - 1 && !contentLine.endsWith("\n")) { | ||
if (generatedColumnOffsetLine === line) { | ||
@@ -424,6 +422,5 @@ generatedColumnOffset += contentLine.length; | ||
let line = generatedLine + generatedLineOffset; | ||
const regexp = /[^\n]+\n?|\n/g; | ||
let match = regexp.exec(remainer); | ||
while (match !== null) { | ||
const contentLine = match[0]; | ||
let matches = splitIntoLines(remainer); | ||
for (let m = 0; m < matches.length; m++) { | ||
const contentLine = matches[m]; | ||
onChunk( | ||
@@ -440,4 +437,3 @@ contentLine, | ||
match = regexp.exec(remainer); | ||
if (match === null && !contentLine.endsWith("\n")) { | ||
if (m === matches.length - 1 && !contentLine.endsWith("\n")) { | ||
if (generatedColumnOffsetLine === line) { | ||
@@ -444,0 +440,0 @@ generatedColumnOffset += contentLine.length; |
{ | ||
"name": "webpack-sources", | ||
"version": "3.2.2", | ||
"version": "3.2.3", | ||
"description": "Source code handling classes for webpack", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
91311
3073