eslint-plugin-markdown-preferences 0.3.2 → 0.3.3
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 +3 -3
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare namespace meta_d_exports {
|
|
|
19
19
|
export { name, version };
|
|
20
20
|
}
|
|
21
21
|
declare const name: "eslint-plugin-markdown-preferences";
|
|
22
|
-
declare const version: "0.3.
|
|
22
|
+
declare const version: "0.3.3";
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/index.d.ts
|
|
25
25
|
declare const configs: {
|
package/lib/index.js
CHANGED
|
@@ -245,7 +245,7 @@ var no_trailing_spaces_default = createRule("no-trailing-spaces", {
|
|
|
245
245
|
|
|
246
246
|
//#endregion
|
|
247
247
|
//#region src/rules/prefer-linked-words.ts
|
|
248
|
-
const
|
|
248
|
+
const RE_BOUNDARY = /^[\s\p{Letter_Number}\p{Modifier_Letter}\p{Modifier_Symbol}\p{Nonspacing_Mark}\p{Other_Letter}\p{Other_Symbol}\p{Script=Han}!"#$%&'(),./:;<=>?\\{|}~\u{2ffc}-\u{303d}\u{30a0}-\u{30fb}\u{3192}-\u{32bf}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{2ebf0}-\u{2ee5d}]*$/u;
|
|
249
249
|
var prefer_linked_words_default = createRule("prefer-linked-words", {
|
|
250
250
|
meta: {
|
|
251
251
|
type: "suggestion",
|
|
@@ -290,7 +290,7 @@ var prefer_linked_words_default = createRule("prefer-linked-words", {
|
|
|
290
290
|
const index = text.indexOf(word, startPosition);
|
|
291
291
|
if (index < 0) break;
|
|
292
292
|
startPosition = index + word.length;
|
|
293
|
-
if (!
|
|
293
|
+
if (!RE_BOUNDARY.test(text[index - 1] || "") || !RE_BOUNDARY.test(text[index + word.length] || "")) continue;
|
|
294
294
|
const loc = sourceCode.getLoc(node);
|
|
295
295
|
const beforeLines = text.slice(0, index).split(/\n/u);
|
|
296
296
|
const line = loc.start.line + beforeLines.length - 1;
|
|
@@ -382,7 +382,7 @@ __export(meta_exports, {
|
|
|
382
382
|
version: () => version
|
|
383
383
|
});
|
|
384
384
|
const name = "eslint-plugin-markdown-preferences";
|
|
385
|
-
const version = "0.3.
|
|
385
|
+
const version = "0.3.3";
|
|
386
386
|
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region src/index.ts
|