markdownlit is a Python library that enhances Streamlit's native Markdown capabilities by introducing 'lit' features such as magic links, colored text, collapsible content, and improved arrow/dash rendering. Built upon the `Python-Markdown` project, it is currently at version 0.0.7 and is actively maintained, though releases follow an irregular cadence.
pip install markdownlitVerified import paths — ran on the pinned version, not inferred.
To use `markdownlit`, import `mdlit` and use it as a drop-in replacement for `st.markdown()` to access its enhanced features like magic links, colored text, and custom arrows.
Upgrade `markdownlit` to v0.0.7 or later and ensure Streamlit is also up-to-date. Review and adapt any custom caching logic if `markdownlit`'s output was previously cached.
Upgrade `markdownlit` to v0.0.4 or later. If still encountering parsing issues, try to isolate if `streamlit-extras.mention` (or other HTML-injecting components) are conflicting and ensure both libraries are the latest compatible versions.
Check Streamlit's official documentation for native colored text capabilities before deciding to use `markdownlit` specifically for this feature. For other unique features like magic links, `markdownlit` remains valuable.
Add `from markdownlit import mdlit` at the top of your Streamlit script.
Ensure both `markdownlit` (v0.0.7+) and Streamlit are updated to their latest versions. Review your code for deprecated caching decorators (`st.cache` should be `st.cache_data` or `st.cache_resource`).
Upgrade `markdownlit` to v0.0.4 or newer. If the problem persists, examine other Streamlit components or custom HTML that might conflict with Markdown parsing, especially those that dynamically alter HTML structure.