Commit graph

240 commits

Author SHA1 Message Date
David Anson
d9de1dd22f Update MD022/blanks-around-headings to allow specifying a different number of blank lines for each heading level (fixes #504). 2023-08-08 22:56:59 -07:00
David Anson
809841098d Update MD022/blanks-around-headings to allow passing -1 for lines_above/lines_below to allow any number of blank lines in that direction (fixes #546). 2023-08-06 15:24:35 -07:00
David Anson
f079df140c Reimplement MD022/blanks-around-headings using micromark tokens. 2023-08-05 23:09:07 -07:00
David Anson
1eb40d3c4c Update MD051/link-fragments to not provide error context for multi-line scenarios. 2023-08-04 21:23:43 -07:00
David Anson
ef1bd286a9 Reimplement MD051/link-fragments using micromark tokens, report reference link issues for definition and fix when possible, handle reporting multiple violations on the same line better. 2023-08-04 20:53:38 -07:00
David Anson
e8cc7eb3cb Reimplement MD045/no-alt-text using micromark tokens, add range information. 2023-07-28 20:19:30 -07:00
Tommy G
07b851b3c7
Always refer to rules by name (not number) in test configuration. 2023-07-27 21:33:03 -07:00
David Anson
73b9704159 Reimplement MD037/no-space-in-emphasis using micromark tokens, report start/end separately for smaller edit spans, remove markdown-it-texmath (fixes #533, fixes #597). 2023-07-24 21:36:55 -07:00
David Anson
e86fb7699d Refactor to move reparse of micromark htmlFlow token content into core micromarkParse implementation for simplicity and sharing. 2023-07-21 22:49:08 -07:00
David Anson
9646590496 Reimplement MD032/blanks-around-lists using micromark tokens, add newly-detected violations to test snapshot. 2023-07-18 22:33:57 -07:00
David Anson
3945de161e Update markdownlint-micromark dependency to 0.1.7, incorporate micromark-extension-math into parse (and compile for demo page). 2023-07-16 22:07:34 -07:00
David Anson
c8236ed0ea Update harness.mjs to output micromark token structure. 2023-07-14 21:36:10 -07:00
David Anson
9897863130 Harden code to snapshot rule definitions against mutation, add comments to some helper functions. 2023-07-12 21:58:48 -07:00
David Anson
14a7529ce7 Snapshot custom rule definitions to prevent them from changing dynamically. 2023-07-11 22:17:53 -07:00
David Anson
c699b8e22b Allow a custom rule's onError implementation to override that rule's information URL for each error. 2023-07-11 21:45:00 -07:00
David Anson
7a794192ca Add support for named heading fragments as supported by some platforms (fixes #830). 2023-07-08 22:14:00 -07:00
David Anson
6f8c70877c Update dependency: markdownlint-micromark to 0.1.6. 2023-06-26 21:00:11 -07:00
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
d01180ec5a Update to version 0.29.0. 2023-06-01 20:41:10 -07:00
David Anson
22dc6cae84 Update micromark code and tests for prior commit updating markdownlint-micromark (including micromark to 3.2.0). 2023-05-31 21:02:44 -07:00
David Anson
b1eff75034 Update MD044/proper-names to parse into micromark htmlFlow tokens for better behavior when html_elements is false (fixes #832). 2023-05-31 20:25:56 -07:00
David Anson
8471914a1d Update MD037/no-space-in-emphasis to handle multiple embedded underscores separated by a single character (fixes #804). 2023-05-27 11:05:17 -07:00
David Anson
dc4acff067 Update MD044/proper-names to ignore the content of HTML comments when its html_elements parameter is false (fixes #832). 2023-05-26 20:58:59 -07:00
David Anson
0006636f75 Update MD049/emphasis-style and MD050/strong-style to not report intraword asterisks/underscores as violations because exchanging either alters meaning (fixes #789). 2023-05-26 04:47:14 +00:00
David Anson
7005a8a438 Reimplement MD049/emphasis-style, MD050/strong-style to use micromark parser (with smaller ranges and handling of multi-line fixes). 2023-05-26 03:50:00 +00:00
David Anson
a4a38ec9d2 Refactor MD049/emphasis-style and MD050/strong-style slightly to simplify. 2023-05-25 02:50:56 +00:00
David Anson
488813f7f7 Update MD034/no-bare-urls to re-scan documents with potential violations using proper reference definition handling to avoid false positives (fixes #787). 2023-05-23 04:01:55 +00:00
David Anson
c740cc5787 Update to version 0.28.2. 2023-04-27 20:28:52 -07:00
David Anson
fcb8190781 Update to version 0.28.1. 2023-04-05 19:30:58 -07:00
David Anson
2ab546bec0 Implement (undocumented, promise-only) extendConfig API for readConfig-like behavior when the Configuration object is already available (i.e., to implement "extends" consistently). 2023-04-03 22:59:06 -07:00
David Anson
95992f23c6 Update to version 0.28.0. 2023-03-23 22:04:35 -07:00
David Anson
5bff33d41b Reimplement MD044/proper-names using micromark tokens. 2023-03-14 21:03:07 -07:00
David Anson
e8a85c91f2 Move call to mapAliasToRuleNames higher in the stack to avoid re-computing multiple times for the same input. 2023-03-12 20:50:17 -07:00
David Anson
4ec9b2049b Tweak filterByPredicate to avoid calling transform when children array is empty. 2023-03-10 22:22:54 -08:00
David Anson
8057f3d37e Reimplement MD035/hr-style using micromark tokens (fixes #736). 2023-03-06 21:39:21 -08:00
David Anson
0c48b4b032 Remove the use of "||=" which is not supported by Node 14 (and hidden by setup-node failing to configure Node 14 for CI workflow). 2023-02-25 16:24:24 -08:00
David Anson
13ced64c21 Rename markdownlint-micromark Token's .tokens property to .children for consistency and clarity. 2023-02-25 15:50:58 -08:00
David Anson
962547ecc8 Reimplement MD038/no-space-in-code using micromark tokens. 2023-02-25 15:50:58 -08:00
David Anson
b787758a48 Update to markdownlint-micromark@0.1.2, include gfmTable extension, change matchAndGetTokensByType return value, include .cjs files when linting. 2023-02-25 15:50:58 -08: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
5302ee45de Add tests for micromark helpers filterByPredicate, filterByTypes, and getMicromarkEvents. 2023-02-25 15:50:57 -08:00
David Anson
c15262a0f5 Switch to using npm version of markdownlint-micromark package and browser script. 2023-02-25 15:50:57 -08:00
David Anson
8e66b8f926 Update markdownlint-micromark package artifacts for browser scenarios. 2023-02-25 15:50:57 -08:00
David Anson
b990b3ea77 Reimplement MD034/no-bare-urls using micromark tokens (fixes #707). 2023-02-25 15:50:57 -08:00
David Anson
64159fa456 Address new @ts-check warnings in markdownlint-test.js. 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
c1df46f607 Convert params.parsers.name to params.parsers.name.tokens for clarity/flexibility. 2023-02-25 15:50:56 -08:00
David Anson
c53df8b720 Fix range calculation in MD033/no-inline-html during re-parse of tabbed content. 2023-02-25 15:50:56 -08:00
David Anson
48a92d41a4 Reimplement MD033/no-inline-html using micromark tokens. 2023-02-25 15:50:56 -08:00
David Anson
08b31da0aa Move micromark.cjs helpers from lib to helpers so it can be used by code in both locations. 2023-02-25 15:50:56 -08:00