bingocode 1.1.157 → 1.1.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -107,6 +107,14 @@ export function findActualString(
|
|
|
107
107
|
return fileContent.substring(dashIndex, dashIndex + searchString.length)
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
// Try with normalized leading whitespace (tab <-> space)
|
|
111
|
+
const normalizedSearch = normalizeIndentation(searchString)
|
|
112
|
+
const normalizedFile = normalizeIndentation(fileContent)
|
|
113
|
+
const indentIndex = normalizedFile.indexOf(normalizedSearch)
|
|
114
|
+
if (indentIndex !== -1) {
|
|
115
|
+
return fileContent.substring(indentIndex, indentIndex + searchString.length)
|
|
116
|
+
}
|
|
117
|
+
|
|
110
118
|
return null
|
|
111
119
|
}
|
|
112
120
|
|