Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown backward compatibility improvements #1134

Merged
merged 2 commits into from Apr 24, 2023

Conversation

dairiki
Copy link
Contributor

@dairiki dairiki commented Apr 21, 2023

This PR makes lektor.markdown.ImprovedRenderer (along with escape and MarkdownConfig) available once again.

These were removed in #992 in the changes made to support running with either mistune 0.x or mistune 2.x.

With this PR, those items are back (though their use will elicit an DeprecationWarning).

The hope is that markdown-customizing plugins that were written for Lektor<3.4 will continue to work (so long as mistune is pinned to 0.x — getting old plugins to work without modification under mistune 2.x is a whole different kettle of fish, since mistune fairly completely change the call signatures of the important renderer methods between versions.)

Issue(s) Resolved

Related Issues / Links

Description of Changes

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)

@dairiki dairiki force-pushed the fix.markdown-bc branch 3 times, most recently from aaffb3e to 650d122 Compare April 23, 2023 20:34
The hope is that markdown-customizing plugins that were written for
Lektor<3.4 will continue to work (so long as mistune is pinned to
0.x.)
@dairiki dairiki added this to the 3.4 milestone Apr 24, 2023
@dairiki dairiki merged commit 2862e23 into lektor:master Apr 24, 2023
15 checks passed
@dairiki dairiki deleted the fix.markdown-bc branch April 24, 2023 18:04
@dairiki dairiki mentioned this pull request Aug 2, 2023
dairiki added a commit to dairiki/lektor that referenced this pull request Sep 11, 2023
* fix: make lektor.markdown.ImprovedRenderer etc available

The hope is that markdown-customizing plugins that were written for
Lektor<3.4 will continue to work (so long as mistune is pinned to
0.x.)

* test(markdown): add a test with a legacy (Lektor<3.4) style plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant