eslint-plugin-markdown-preferences 0.26.0 → 0.26.1
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/lib/index.d.ts +1 -1
- package/lib/index.js +7 -2
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -498,7 +498,7 @@ declare namespace meta_d_exports {
|
|
|
498
498
|
export { name, version };
|
|
499
499
|
}
|
|
500
500
|
declare const name: "eslint-plugin-markdown-preferences";
|
|
501
|
-
declare const version: "0.26.
|
|
501
|
+
declare const version: "0.26.1";
|
|
502
502
|
//#endregion
|
|
503
503
|
//#region src/index.d.ts
|
|
504
504
|
declare const configs: {
|
package/lib/index.js
CHANGED
|
@@ -1542,7 +1542,12 @@ var definitions_last_default = createRule("definitions-last", {
|
|
|
1542
1542
|
if (c === "\n") lineFeeds++;
|
|
1543
1543
|
}
|
|
1544
1544
|
yield fixer.removeRange([rangeStart, range[1]]);
|
|
1545
|
-
|
|
1545
|
+
const startColumnOffset = loc.start.column - 1;
|
|
1546
|
+
const insertLines = sourceCode.lines.slice(loc.start.line - 1, loc.end.line).map((lineText, i, arr) => {
|
|
1547
|
+
if (i === arr.length - 1) return lineText.slice(startColumnOffset, loc.end.column - 1);
|
|
1548
|
+
return lineText.slice(startColumnOffset);
|
|
1549
|
+
});
|
|
1550
|
+
let insertText = sourceCode.text.slice(rangeStart, lineStart) + insertLines.join(/\r?\n/u.exec(sourceCode.text)?.[0] ?? "\n");
|
|
1546
1551
|
if (prev.type === "footnoteDefinition" && node.type !== "footnoteDefinition" && lineFeeds <= 1) insertText = `\n${insertText}`;
|
|
1547
1552
|
if (next && node.type === "footnoteDefinition" && next.type !== "footnoteDefinition") {
|
|
1548
1553
|
const prevLoc = sourceCode.getLoc(prev);
|
|
@@ -11219,7 +11224,7 @@ var meta_exports = /* @__PURE__ */ __export({
|
|
|
11219
11224
|
version: () => version
|
|
11220
11225
|
});
|
|
11221
11226
|
const name = "eslint-plugin-markdown-preferences";
|
|
11222
|
-
const version = "0.26.
|
|
11227
|
+
const version = "0.26.1";
|
|
11223
11228
|
|
|
11224
11229
|
//#endregion
|
|
11225
11230
|
//#region src/index.ts
|