From cc5c858606b96029baf1a73ec5391a084340006e Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Thu, 25 Apr 2024 20:56:03 +0200 Subject: [PATCH] feat: quickfix for mkdocs (#51) Signed-off-by: Simon Schrottner --- test/markdown-admonition.json | 21 +++++++++++++++++++++ test/markdown-admonition.md | 7 +++++++ test/snapshots/rules-tests.js.md | 16 ++++++++++++++++ test/snapshots/rules-tests.js.snap | Bin 4383 -> 4794 bytes 4 files changed, 44 insertions(+) create mode 100644 test/markdown-admonition.json create mode 100644 test/markdown-admonition.md diff --git a/test/markdown-admonition.json b/test/markdown-admonition.json new file mode 100644 index 0000000..a573d18 --- /dev/null +++ b/test/markdown-admonition.json @@ -0,0 +1,21 @@ +{ + "default": false, + "max-one-sentence-per-line": { + "ignored_words": [ + "ie", + "i.e", + "eg", + "e.g", + "etc", + "ex", + "!!", + "??" + ], + "line_endings": [ + ".", + "?", + "!" + ], + "context_length": 14 + } +} diff --git a/test/markdown-admonition.md b/test/markdown-admonition.md new file mode 100644 index 0000000..b03d7ef --- /dev/null +++ b/test/markdown-admonition.md @@ -0,0 +1,7 @@ +# max-one-sentence-per-line + +## Text + +!!! note admonition + +??? other stuff diff --git a/test/snapshots/rules-tests.js.md b/test/snapshots/rules-tests.js.md index 4f2a7dd..2d72136 100644 --- a/test/snapshots/rules-tests.js.md +++ b/test/snapshots/rules-tests.js.md @@ -4,6 +4,22 @@ The actual snapshot is saved in `rules-tests.js.snap`. Generated by [AVA](https://avajs.dev). +## markdown-admonition.md + +> Snapshot 1 + + { + errors: [], + fixed: `# max-one-sentence-per-line␊ + ␊ + ## Text␊ + ␊ + !!! note admonition␊ + ␊ + ??? other stuff␊ + `, + } + ## sentences-per-line.md > Snapshot 1 diff --git a/test/snapshots/rules-tests.js.snap b/test/snapshots/rules-tests.js.snap index 2e4632f4fca05822522c55ef42add6ffefedc88a..6c346257c7eec118a4e13df76adf7035d71571a3 100644 GIT binary patch literal 4794 zcmV;r5=HGnRzVTVY$r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