eslint-plugin-markdown-preferences 0.40.0 → 0.40.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 CHANGED
@@ -645,7 +645,7 @@ declare namespace meta_d_exports {
645
645
  export { name, version };
646
646
  }
647
647
  declare const name: "eslint-plugin-markdown-preferences";
648
- declare const version: "0.40.0";
648
+ declare const version: "0.40.1";
649
649
  //#endregion
650
650
  //#region src/language/ast-types.d.ts
651
651
  type Node = mdast.Node;
package/lib/index.js CHANGED
@@ -4570,12 +4570,12 @@ var PreserveWordsContext = class {
4570
4570
  if (firstLowerWord !== phrase[0].toLowerCase()) continue;
4571
4571
  while (subWords.length < phrase.length) {
4572
4572
  const word = words.next();
4573
- if (word.done) return null;
4573
+ if (word.done) break;
4574
4574
  subWords.push(word.value);
4575
4575
  }
4576
- if (subWords.every((word, i) => word.toLowerCase() === phrase[i].toLowerCase())) {
4576
+ if (subWords.length >= phrase.length && phrase.every((word, i) => subWords[i].toLowerCase() === word.toLowerCase())) {
4577
4577
  let matchCount = 0;
4578
- for (let i = 0; i < subWords.length; i++) if (subWords[i] === phrase[i]) matchCount++;
4578
+ for (let i = 0; i < phrase.length; i++) if (subWords[i] === phrase[i]) matchCount++;
4579
4579
  if (!returnCandidate || matchCount > returnCandidate.matchCount) returnCandidate = {
4580
4580
  preservePhrase: phrase,
4581
4581
  matchCount
@@ -12754,7 +12754,7 @@ var meta_exports = /* @__PURE__ */ __export({
12754
12754
  version: () => version
12755
12755
  });
12756
12756
  const name = "eslint-plugin-markdown-preferences";
12757
- const version = "0.40.0";
12757
+ const version = "0.40.1";
12758
12758
 
12759
12759
  //#endregion
12760
12760
  //#region src/language/extensions/micromark-custom-container.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-markdown-preferences",
3
- "version": "0.40.0",
3
+ "version": "0.40.1",
4
4
  "description": "ESLint plugin that enforces our markdown preferences",
5
5
  "type": "module",
6
6
  "exports": {