Skip to content

Commit 3fb682c

Browse files
committed
Support for remark-lint-strikethrough-marker
To warn when the number of strikethrough markers is inconsistent and does not use two strikethrough markers (`~~`) the `remark-lint-strikethrough-marker` [1] has been added to support such checks. [1]: https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-strikethrough-marker GH-67
1 parent 57d2f2c commit 3fb682c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/@svengreb/remark-preset-lint/rules/support.js

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import footnotes from "remark-footnotes";
77
import frontmatter from "remark-frontmatter";
88
import gfm from "remark-gfm";
9+
import strikethroughMarker from "remark-lint-strikethrough-marker";
910

1011
/**
1112
* Support for plugins of specification addons and variants.
@@ -50,6 +51,12 @@ const support = {
5051
tablePipeAlign: true,
5152
},
5253
],
54+
/**
55+
* Warn when the number of strikethrough markers is inconsistent and does not use two strikethrough markers.
56+
* @see https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-strikethrough-marker
57+
* @see https://github.com/svengreb/styleguide-markdown/blob/main/rules/emphasis.md#strikethrough
58+
*/
59+
[strikethroughMarker, "~~"],
5360
],
5461
};
5562

rules/emphasis.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Use two (2) asterisk `*` marker to generate spans for bold formatted text.
6464
6565
Use two (2) tilde `~` marker to generate spans for strikethrough text.
6666

67-
> remark-lint: [emphasis-marker][2]
67+
> remark-lint: [strikethrough-marker][6], [emphasis-marker][2]
6868
6969
###### Examples
7070

@@ -171,3 +171,4 @@ __ Snow __
171171
[3]: https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-emphasis-as-heading
172172
[4]: https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-no-inline-padding
173173
[5]: https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-strong-marker
174+
[6]: https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-strikethrough-marker

0 commit comments

Comments
 (0)