✨ Add GFM autolink and composite GFM plugins#135
✨ Add GFM autolink and composite GFM plugins#135chrisjsewell wants to merge 3 commits intomasterfrom
Conversation
Add two new plugins: - `gfm_autolink`: GFM autolink literals (www, protocol, email) using the new `add_terminator_char` API from markdown-it-py 4.1.0 - `gfm`: Composite plugin enabling tables, strikethrough (single+double tilde), autolinks, task lists, alerts, and footnotes Both require markdown-it-py >= 4.1.0.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #135 +/- ##
==========================================
- Coverage 92.80% 92.68% -0.12%
==========================================
Files 31 38 +7
Lines 1835 2257 +422
==========================================
+ Hits 1703 2092 +389
- Misses 132 165 +33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ReviewSummaryThis PR adds two new plugins:
All 32 tests pass. Positives
Issues / Suggestions1.
|
Summary
Adds two new plugins that require markdown-it-py >= 4.1.0:
gfm_autolink— GFM autolink literalsImplements the GFM autolinks extension
with three inline scanners:
www.URLs (trigger char:w, viaadd_terminator_char)http:///https:///mailto:/xmpp:URLs (trigger char::)@)Matching logic is ported from the Rust
gfm_autolinks
crate. Covers GFM spec examples 622–635 plus additional edge cases
(trailing delimiters, emphasis integration, parentheses balancing, etc.).
gfm— Composite GFM pluginA single-call plugin that enables a GFM-like configuration:
gfm_autolink)footnote_plugin, inline=False)Tag filtering is noted as a TODO.
Other changes
tox.ini: test envs pinmarkdown-it-py>=4.1.0pyproject.toml: addedpytest-timeoutto testing extrasReferences
add_terminator_charAPI (PR ✨Allow plugins to register inline terminator characters markdown-it-py#391)