@biffo/cli 0.324.8 → 0.324.9
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/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10722,9 +10722,11 @@ function findManagedRegion(source) {
|
|
|
10722
10722
|
const bodyStart = startIdx + REGISTRY_START_MARKER.length;
|
|
10723
10723
|
const endIdx = source.indexOf(REGISTRY_END_MARKER, bodyStart);
|
|
10724
10724
|
if (endIdx === -1) return null;
|
|
10725
|
+
const lineStart = source.lastIndexOf("\n", endIdx - 1) + 1;
|
|
10726
|
+
const seam = lineStart >= bodyStart && /^[ \t]*$/.test(source.slice(lineStart, endIdx)) ? lineStart : endIdx;
|
|
10725
10727
|
return {
|
|
10726
|
-
region: { before: source.slice(0, bodyStart), after: source.slice(
|
|
10727
|
-
body: source.slice(bodyStart,
|
|
10728
|
+
region: { before: source.slice(0, bodyStart), after: source.slice(seam) },
|
|
10729
|
+
body: source.slice(bodyStart, seam)
|
|
10728
10730
|
};
|
|
10729
10731
|
}
|
|
10730
10732
|
var SLUG_FIELD_PATTERN = /\bslug\s*:\s*(['"])([a-zA-Z0-9_-]+)\1/;
|