Commit graph

35 commits

Author SHA1 Message Date
David Anson
c06506c317 Reimplement MD026/no-trailing-punctuation using micromark tokens, ignore trailing GitHub emoji codes, improve tests (fixes #457). 2023-06-24 15:47:06 -07:00
David Anson
5bff33d41b Reimplement MD044/proper-names using micromark tokens. 2023-03-14 21:03:07 -07:00
David Anson
4b27bac79b Update all references to "params.tokens" to "params.parsers.markdownit.tokens" for clarity. 2023-02-25 15:50:57 -08:00
David Anson
97f99befb8 Reimplement getReferenceLinkImageData using micromark tokens. 2023-02-25 15:50:57 -08:00
David Anson
48a92d41a4 Reimplement MD033/no-inline-html using micromark tokens. 2023-02-25 15:50:56 -08:00
David Anson
f000a33481 Add test for helpers.getReferenceLinkImageData().shortcuts to verify non-shortcut link scenaros aren't mis-reported (closes #684). 2022-12-22 23:28:04 +00:00
David Anson
8d6e0b5419 Replace helpers.urlRe with helpers.urlFe to address "innefficient regular expression" CodeQL alert, introduce function expressions as an alternative, test more inputs. 2022-12-18 15:46:19 -08:00
David Anson
485c63c579 Add more test cases for helpers.urlRe, refactor corresponding test to go line-by-line and use exec. 2022-12-17 15:38:55 -08:00
David Anson
2e2937081e Rename helpers.bareUrlRe to urlRe, improve it a little, add tests 2022-12-15 13:54:54 -08:00
David Anson
f0bb4c639b Change HTML comment content sanitization to avoid breaking list item indent, respect table cell content rules (fixes #563). 2022-10-14 20:59:56 -07:00
David Anson
4c00ffa2f0 Fix new violations from eslint-plugin-unicorn update. 2022-08-15 21:20:27 -07:00
David Anson
5b0588f378 Update helpers.expandTildePath to handle receiving an os object without homedir, address minor @ts-check confusion in same file. 2022-07-24 12:22:32 -07:00
David Anson
6e8a0737b5 Reimplement helpers.forEachInlineCodeSpan for ~11% time reduction measured via profile-fixture.mjs on GitHub Codespaces. 2022-06-19 02:14:03 +00:00
David Anson
936c876810 Remove helpers.deepFreeze and call Object.freeze only on things that need it for ~11% time reduction measured via profile-fixture.mjs on Apple Silicon M1. 2022-06-09 23:56:44 -07:00
David Anson
b6471fba31 Enable ESLint rule unicorn/no-array-for-each, auto-fix all violations, manually address new issues for ~4% time reduction measured via profile-fixture.mjs on Apple Silicon M1. 2022-06-08 22:10:27 -07:00
David Anson
bbec8c5c1e Hide the content of inline configuration HTML comments from the linting process to avoid false positives. 2022-06-04 22:59:19 -07:00
David Anson
ffc4d56918 Support tilde paths ("~" prefix) in readConfig/Sync APIs (for "file" parameter and "extends" keys). 2022-05-17 21:38:36 -07:00
David Anson
a8f946e0b3 Refactor/simplify helpers.getPreferredLineEnding to use os.EOL instead of process.platform. 2022-05-06 21:04:34 -07:00
David Anson
19dfb960f1 Refactor to remove helpers.getPlatformIdentifier and simplify. 2022-05-05 23:14:18 -07:00
David Anson
295e481552 Fix null dereference in helpers.getPreferredLineEnding when running in browser (platform unknown, process object not available) and input string does not contain line endings. 2022-05-04 22:09:11 -07:00
David Anson
0f845e9ba1 Update MD044/proper-names to add html_elements parameter (fixes #435). 2022-04-25 21:50:33 -07:00
David Anson
7a53caa7fb Replace helpers.linkRe with helpers.forEachLink to fix "Polynomial regular expression used on uncontrolled data" and to better support link syntax. 2022-02-18 21:14:14 -08:00
David Anson
1c89dd5776 Reimplement helpers.isBlankLine to fix an instance of "Polynomial regular expression used on uncontrolled data". 2022-02-11 21:54:43 -08:00
David Anson
b9474e84a3 Add optional "platform" parameter to helpers.applyFixes (closes #496). 2022-02-09 22:44:49 -08:00
David Anson
fd24b9552b Remove require("os") from helpers to reduce dependencies for browser scenarios. 2021-12-27 03:41:43 +00:00
David Anson
5f0040679d Deep freeze name/tokens/lines/frontMatterLines properties of params object before passing to (custom) rules for shared access. 2021-12-23 04:34:25 +00:00
David Anson
6dea67825a Update definition of helpers.isBlankLine to treat unterminated start/end comments as potentially blank lines (fixes #431). 2021-12-20 04:18:45 +00:00
David Anson
ed325ebb56 Update MD004/ul-style to auto-fix violations (fixes #351). 2021-02-06 15:49:02 -08:00
David Anson
c7d2416f95 Change comment replacement character from " " (with trailing "\") to "." to avoid creating indented code blocks. 2021-01-30 14:36:11 -08:00
David Anson
c4e236b858 Update clearHtmlCommentText helper to match CommonMark (instead of HTML) specification (refs #361). 2021-01-30 13:08:57 -08:00
David Anson
838afe0a00 Update clearHtmlCommentText helper to match HTML specification better; "--" within a comment does not make it invalid (fixes #361). 2021-01-28 21:45:53 -08:00
David Anson
49945d6601 Convert from tape test harness to ava, address minor declaration file issue. 2021-01-10 20:46:00 -08:00
David Anson
09c5736385 Remove automatic fix from MD028/no-blanks-blockquote due to ambiguity (fixes #315). 2020-11-23 14:57:19 -08:00
David Anson
1f6a2cdc96 Split primary test cases across multiple files, address bogus @ts-ignore issues. 2020-09-12 12:42:46 -07:00
David Anson
ebc74e3d5f Duplicate markdownlint-test.js as first step of splitting it into smaller files. 2020-09-12 12:13:06 -07:00