Commit graph

31 commits

Author SHA1 Message Date
David Anson
d22c1f19ef Refactor various code to do shallow/constrained search instead of deep search for better performance, make cache key for filterByTypesCached unique. 2024-10-09 22:42:36 -07:00
David Anson
04c693b00b Update MD051/link-fragments to add ignore_case parameter and improve documentation (fixes #1274). 2024-10-08 22:40:25 -07:00
David Anson
33631a5984 Split micromark.cjs into separate -parse and -helpers files. 2024-09-28 16:26:38 -07:00
David Anson
dfcb4529f3 Cache all top-level calls to filterByTypes (~7% runtime reduction). 2024-08-24 22:05:16 -07:00
David Anson
1513e3803b Remove outdated type annotations and lint suppressions. 2024-06-21 21:03:37 -07:00
David Anson
12502f6571 Exclude htmlFlow content by default for filterByTypes, opt in as needed. 2024-06-09 17:09:03 -07:00
David Anson
fdd8ba1974 Update MD051/link-fragments to include math text when creating heading fragments (fixes #1152). 2024-03-17 14:31:49 -07:00
David Anson
d5994ae4de Add Rule.parser property for custom rules to specify which Markdown parser output they use, honor it strictly, and add full type support. 2024-03-13 20:55:57 -07:00
David Anson
28e1b23955 Improve type safety by strongly-typing the micromark token type property everywhere. 2024-02-29 23:05:27 -08:00
David Anson
828ae3541a Use @type to provide typing for all instances of params.parsers.micromark.tokens. 2024-02-28 21:01:47 -08:00
David Anson
12c4f79604 Add parsers object to RuleParams type, annotate every rule definition with Rule type for better type validation. 2024-02-27 20:42:09 -08:00
David Anson
45c8766eda Refine previous commit for MD051/link-fragments to tweak behavior, tests, and documentation. 2024-02-10 15:41:55 -08:00
Théo LUDWIG
242b35f98f Update MD051/link-fragments to support GitHub-style line/column range syntax in URLs (refs #1117). 2024-02-10 15:41:55 -08:00
David Anson
3b1dfe42df Remove deprecated ESLint rules after version update. 2023-11-05 20:18:39 -08:00
David Anson
06466905a5 Add getHtmlAttributeRe helper for creating a RegExp to match an HTML attribute name/value. 2023-10-18 23:45:39 -07:00
David Anson
941769f204 Update MD051/link-fragments to handle backslash-escaping in heading text (fixes #984). 2023-09-18 22:20:44 -07:00
David Anson
ba260b9b1e Update MD051/link-fragments to handle backslash-escaped content in link and definition destinations (fixes #956). 2023-09-06 21:25:00 -07:00
David Anson
1ddee6b195 Update MD051/link-fragments to also look for a fragment matching the URI-encoded link definition (implicit behavior in previous version via markdown-it) (fixes #954, fixes #955). 2023-09-06 20:50:56 -07:00
David Anson
a736588958 Update MD051/link-fragments to handle links and images in headings (fixes #945). 2023-09-04 12:26:38 -07:00
David Anson
24c97a54fb Refactor micromark token handling to remove optional Token.htmlFlowChildren property and make related code more efficient for a ~6% elapsed time reduction. 2023-09-02 19:32:25 -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
7a794192ca Add support for named heading fragments as supported by some platforms (fixes #830). 2023-07-08 22:14:00 -07: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
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
1bd748f79e Update MD051/link-fragments to ignore HTML comments embedded in heading text. 2022-07-19 06:29:52 +00:00
David Anson
152720f00e Update MD051/link-fragments to support indexing of repated headings. 2022-04-21 21:02:46 -07:00
David Anson
8c5f28c2f0 Refactor MD051/link-fragments slightly to reduce dependencies. 2022-04-20 21:27:21 -07:00
David Anson
9a5e7e42ef Update MD051/link-fragments to use the same character classes as GitHub, encode unprintable characters from emojii. 2022-04-18 20:59:01 -07:00
David Anson
db5d9f6dbb Update previous commit for MD051/link-fragments to rename, refactor, add support for HTML anchors, and validate against
markdown-link-check (fixes #253).
2022-04-16 14:08:56 -07:00
Divlo
33ee1cd85e Initial implementation of MD051/valid-link-fragments (refs #253, closes #495). 2022-04-16 14:08:56 -07:00