eslint-plugin-markdown-preferences 0.40.1 → 0.40.2
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 +10 -2
- package/package.json +1 -1
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.
|
|
648
|
+
declare const version: "0.40.2";
|
|
649
649
|
//#endregion
|
|
650
650
|
//#region src/language/ast-types.d.ts
|
|
651
651
|
type Node = mdast.Node;
|
package/lib/index.js
CHANGED
|
@@ -7987,6 +7987,13 @@ var no_heading_trailing_punctuation_default = createRule("no-heading-trailing-pu
|
|
|
7987
7987
|
const sourceCode = context.sourceCode;
|
|
7988
7988
|
const segmenter$1 = new Intl.Segmenter("en", { granularity: "grapheme" });
|
|
7989
7989
|
const punctuationMap = buildPunctuationMap(context.options[0]?.punctuation, segmenter$1);
|
|
7990
|
+
const contentNodeTypes = new Set([
|
|
7991
|
+
"inlineCode",
|
|
7992
|
+
"image",
|
|
7993
|
+
"imageReference",
|
|
7994
|
+
"html",
|
|
7995
|
+
"inlineMath"
|
|
7996
|
+
]);
|
|
7990
7997
|
return { heading(node) {
|
|
7991
7998
|
if (!node.children.length) return;
|
|
7992
7999
|
const punctuationChars = punctuationMap[node.depth];
|
|
@@ -8030,6 +8037,7 @@ var no_heading_trailing_punctuation_default = createRule("no-heading-trailing-pu
|
|
|
8030
8037
|
if (child.value.trim()) return child;
|
|
8031
8038
|
continue;
|
|
8032
8039
|
}
|
|
8040
|
+
if (contentNodeTypes.has(child.type)) return null;
|
|
8033
8041
|
if ("children" in child && Array.isArray(child.children)) {
|
|
8034
8042
|
const nestedLast = findLastTextNode(child.children);
|
|
8035
8043
|
if (nestedLast) return nestedLast;
|
|
@@ -9134,7 +9142,7 @@ var no_trailing_spaces_default = createRule("no-trailing-spaces", {
|
|
|
9134
9142
|
}
|
|
9135
9143
|
});
|
|
9136
9144
|
},
|
|
9137
|
-
"code, inlineCode,
|
|
9145
|
+
"code, inlineCode, yaml, toml, json"(node) {
|
|
9138
9146
|
ignoreNodes.push(node);
|
|
9139
9147
|
},
|
|
9140
9148
|
"root:exit"() {
|
|
@@ -12754,7 +12762,7 @@ var meta_exports = /* @__PURE__ */ __export({
|
|
|
12754
12762
|
version: () => version
|
|
12755
12763
|
});
|
|
12756
12764
|
const name = "eslint-plugin-markdown-preferences";
|
|
12757
|
-
const version = "0.40.
|
|
12765
|
+
const version = "0.40.2";
|
|
12758
12766
|
|
|
12759
12767
|
//#endregion
|
|
12760
12768
|
//#region src/language/extensions/micromark-custom-container.ts
|