Make fastpylight highlighting optional, shrinking the wheel from 8.8MB to 0.95MB - #50
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
hlcargo feature is gone: mdhtml no longer links fastpylight.HtmlExportOptionsgains anhl_fnhook,(code, lang, mode) -> Result<Option<String>, String>in plain std types, so any highlighter can plug in. Rust consumers who want fastpylight depend on it themselves and pass its functions through. The spans path accepts inner spans or a whole<pre><code>block and keeps mdhtml's own wrapper and attributes, andmdfences still self-highlight with no dependency.From Python nothing changes when fastpylight is present:
pip install 'mdhtml[hl]'provides it, mdhtml wires it in lazily per export, and output is byte-identical to the linked build. A bare install renders code blocks plain and adds a warning naming the extra.mdhtml.theme_cssandmdhtml.themesare removed: use fastpylight's directly, as viewmd and md2html now do.Also fixes two stale wikitext test assertions.