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
David Anson
1461ad6272
Add content parsing via micromark, publish frozen micromark tokens alongside markdown-it tokens, remove assert from micromark wrapper.
2023-02-25 15:50:56 -08:00
David Anson
fc2ed221ff
Use .cjs extension for markdownlint-micromark output files for clarity.
2023-02-25 15:49:52 -08:00
David Anson
c9e8f8b8ea
Convert micromark.mjs to micromark.cjs for use by synchronous APIs in markdownlint.js.
2023-02-25 15:49:52 -08:00
David Anson
bb0aa012b5
Use webpack to create a CommonJS module from micromark's ESM implementation, convert to using that.
2023-02-25 15:49:52 -08:00
David Anson
5038f6e154
Work around likely micromark bug in sliceSerialize (link to GitHub issue in code).
2023-02-25 15:49:51 -08:00
David Anson
000281e2f0
Add "// @ts-check" to top of new micromark-related modules, fix import typo.
2023-02-25 15:49:51 -08:00
David Anson
366a498150
Initial implementation of markdownlint-micromark package, micromark.mjs helpers, and tests.
2023-02-25 15:49:51 -08:00
David Anson
5a4cf179c4
Update to version 0.27.0 ( closes #669 ).
2022-12-28 01:26:27 +00:00
David Anson
868edf889e
Manually fix three new ESLint warnings from the eslint-plugin-regexp plugin (refs #657 ).
2022-12-19 21:51:18 -08:00
David Anson
6b01a98363
Add ESLint plugin eslint-plugin-regexp, enable recommended rules, apply all automated fixes (refs #657 ).
2022-12-19 21:36:24 -08: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
ac8f495ea2
Update MD051/link-fragments to identify and fix scenarios where the link fragment has the wrong case ( fixes #605 ).
2022-12-16 13:50:38 -08:00
David Anson
d352d4ece1
Update MD034/no-bare-urls to handle more scenarios, simplify slightly, replace blanket MD034 suppression for https://github.com/mdn/content with specific (valid) issues (refs #607 ).
2022-12-15 14:27:07 -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
5eef37751b
Update MD022/blanks-around-headings to include blockquote prefix if fixing inside a blockquote ( fixes #654 ).
2022-12-07 21:16:36 -08:00
David Anson
2146bbae5f
Update MD033/no-inline-html to ignore HTML in labels for reference links/images ( fixes #658 ).
2022-12-06 22:57:45 -08:00
David Anson
cba5e8d340
Update MD034/no-bare-urls to better handle multiple similar issues on the same line (fixes https://github.com/igorshubovych/markdownlint-cli/issues/339 ).
2022-12-06 22:14:40 -08:00
David Anson
f84c91d95f
Update MD034/no-bare-urls to allow bare URLs inside the link text of HTML A tags (fixes 615).
2022-11-13 21:39:14 -08:00
Sébastien Règne
72439f42c6
Update MD040/fenced-code-language to add language_only parameter to reject extra data in info string.
2022-11-10 22:07:04 -08:00
David Anson
99a3f164a9
Update MD013/line-length to permit long link/image reference definitions in all modes because they can not be easily split.
2022-11-08 21:40:33 -08:00
Sébastien Règne
b73ab7fd91
Update MD040/fenced-code-language to use case-sensitive comparison for allowed languages ( fixes #627 ).
2022-11-05 17:41:27 -07:00
David Anson
13b4340747
Update all links to rules to use md000.md instead of Rules.md#md000 (shorter, quicker, less distraction).
2022-10-30 14:58:45 -07:00
David Anson
37baddcf27
Generate Rules.md and md###.md files from metadata, improve Parameters documentation by referencing schema.
2022-10-29 23:21:45 -07:00
Mateus Ferreira
37f74ee958
Update MD043/required-headings to add match_case parameter ( fixes #613 ).
2022-10-22 00:15:50 -07:00
Sam Chen
01ba757d3a
Update MD040/fenced-code-language to add allowed_languages parameter ( fixes #610 ).
2022-10-17 12:29:29 -07:00
David Anson
c333976a44
Update MD011/no-reversed-links to avoid more nested paren scenarios ( fixes #572 ).
2022-10-16 22:16:51 -07:00
David Anson
4c00ffa2f0
Fix new violations from eslint-plugin-unicorn update.
2022-08-15 21:20:27 -07:00
David Anson
ebf249b6cc
Update to version 0.26.2.
2022-08-08 21:05:50 -07:00
David Anson
a6489acd6b
Update MD053/link-image-reference-definitions to add ignored_definitions parameter (default to ["//"]) ( fixes #545 ).
2022-08-02 20:36:47 -07:00
David Anson
2c3e8c938b
Update MD053/link-image-reference-definitions to handle multi-line references inside blockquotes ( fixes #544 ).
2022-08-01 18:48:01 -07:00
David Anson
5544ea54d7
Remove workaround for markdown-it-texmath issue fixed in @1.0.0.
2022-08-01 18:29:18 -07:00
David Anson
1154ab483b
Update MD037/no-space-in-emphasis to ignore the content of HTML attributes ( fixes #540 ).
2022-07-30 20:35:27 -07:00
Mark Lodato
6c8ef48f94
Update MD051/link-fragments to support id attributes on non-a elements ( fixes #538 ).
...
The `name` is only an anchor on `a` elements, but `id` is a universal
attribute on all elements.
Also fix match on id/name to be complete, not just a suffix.
2022-07-27 21:42:05 -07:00
David Anson
cba2ca0dbd
Update to version 0.26.1.
2022-07-24 12:31:06 -07:00
David Anson
1bd748f79e
Update MD051/link-fragments to ignore HTML comments embedded in heading text.
2022-07-19 06:29:52 +00:00
David Anson
51cec76c2b
Update to version 0.26.0.
2022-06-21 21:16:44 -07:00
David Anson
53cbf063e3
Update dependencies: c8 to 7.11.3, eslint to 8.18.0, eslint-plugin-jsdoc to 39.3.3, eslint-plugin-unicorn to 42.0.0, globby to 13.1.2, markdown-it-texmath to 1.0.0, markdownlint-rule-helpers to 0.16.0, ts-loader to 9.3.0, typescript to 4.7.4, webpack to 5.73.0, webpack-cli to 4.10.0.
2022-06-20 04:41:08 +00:00
David Anson
e8cdb5619c
Update token annotation to call helpers.forEachInlineCodeSpan only when necessary for ~11% time reduction measured via profile-fixture.mjs on GitHub Codespaces.
2022-06-17 05:29:12 +00:00
David Anson
1f9497ad09
Refactor MD009/no-trailing-spaces to remove dependency on helpers.forEachInlineCodeSpan.
2022-06-16 05:19:27 +00:00
David Anson
54acae87ea
Update MD009/no-trailing-spaces to remove unnecessary sorting, add additional test cases.
2022-06-16 04:48:51 +00:00
David Anson
28b273e798
Add more test cases for trailing spaces.
2022-06-13 22:53:48 -07:00
David Anson
ac38a614e9
Update MD038/no-space-in-code to check token.content before calling helpers.forEachInlineCodeSpan for ~6% time reduction measured via profile-fixture.mjs on Apple Silicon M1.
2022-06-12 19:04:39 -07:00
David Anson
a14df5aa5f
Remove unused parameter to helpers.getReferenceLinkImageData.
2022-06-12 18:39:28 -07:00
David Anson
312f4b8c6d
Address new TypeScript warnings from VS Code.
2022-06-11 22:40:45 -07: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