All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Migrate all hardcoded
neutral-*andsky-*color classes to DaisyUI semantic tokens (base-content,primary,secondary-content,base-100/200/300) for theme-aware styling with proper dark mode support - Add
styles.cssstylesheet andscripts/tailwind.shbuild script for Tailwind CSS compilation pipeline - Configure hatch build to include
styles.cssand documentation files in sdist distribution
- MathJax config escaping: reverted quadruple backslash (
\\\\() so JS receives correct\(delimiter - Split math expression merge regex: replaced inline replacement string with callback function that checks
group3.strip()to avoid creating trailing space before closing$, which brokepymdownx.arithmatexdelimiter detection _replace_common_latex_commands_in_text: skip<span class="arithmatex">nodes so fallback LaTeX→Unicode conversion doesn't strip\(and\)delimiters needed by MathJax
- Image caption detection:
<em>wrapping a link is now treated as italic text, not an image caption (consistent with_is_image_caption_paragraph)
- Reduced excessive spacing between images and captions. Added dedicated handling for paragraphs that contain image + caption content in a single block, removed injected
<br>spacing in that case, and applied tighter caption typography/spacing classes.
_ensure_list_spacingwas inserting a blank line before every list item (including items 2, 3, 4…), causing each* itemto become a separate<ul>block. It now only inserts a blank line before the first item of a list block (i.e. when the preceding line is not itself a list marker).
- Support for 5 new Markdown extensions:
abbr(abbreviations with<abbr>tooltip),def_list(definition lists<dl>/<dt>/<dd>),footnotes([^1]syntax),admonition(!!! note/warning/danger/...callout boxes),toc(auto-generatesidattributes on headings for anchor links) - Tailwind classes for all new elements:
<abbr>,<dl>/<dt>/<dd>, admonition boxes (color-coded by type), footnote section - Admonition color scheme:
note/info→ blue,tip/hint/success→ green,warning/caution/attention→ amber,danger/error→ red,important→ purple
- List items (
* item,- item,1. item) and blockquotes immediately following a paragraph (no blank line) were not rendered as HTML lists due to thenl2brextension consuming the newline. A new_ensure_list_spacingpreprocessor inserts the required blank line automatically.
font_sizeparameter onConverter('sm','base','lg'; default'base') to control the typographic scale of all rendered elements--font-sizeCLI flag (sm|base|lg) passed through toConverter
- Badge paragraphs now render inline with
flex flex-wrap gap-2 items-center justify-centerinstead of stacked with full line-height spacing - Deprecated
align="center/left/right"HTML attributes are now translated to Tailwindtext-center/left/rightclasses and removed from output
md_in_htmlextension was a no-op; added_inject_markdown_attrpreprocessor to injectmarkdown="1"into block-level HTML tags so inner markdown (bold, links, badges) renders correctly- Double-escaping of Django template delimiters in
<pre><code>blocks;<code>inside<pre>is now skipped - XSS:
audio_idnow sanitized withre.sub(r'[^a-z0-9_]', '_', ...)to strip all non-safe characters from inline JS - XSS:
audio_urlvalidated to only accepthttp://,https://, or/-prefixed paths;javascript:and other schemes are rejected - URL allowlist mismatch between
_is_audio_tableandconvert_tables; both now require the same prefixes, eliminating silent row loss - Badge images (inside
<a>) no longer inherit the full-width block image classes; they receiveinline h-5 align-middleinstead - Badge links (sole child is
<img>) no longer receive text/underline Tailwind classes - Removed dead
media_suffixesvariable from_is_audio_table
- Initial release of
md2html-tailwind4 Converterclass withconvert_md_to_html()method- Tailwind CSS 4 class annotations for all standard HTML elements (h1–h6, p, ul, ol, li, blockquote, img, pre, code, strong, em, a, hr)
- Responsive table styling with overflow scrolling
- Audio table support: 3-column tables with media URLs are converted to interactive audio player widgets
- Django template delimiter escaping (
{{ }},{% %},{# #}) inside code blocks - External links automatically get
target="_blank"andrel="noopener noreferrer" - Dark mode support via Tailwind
dark:variants - CLI entry point:
md2html input.md output.html src/layout for clean PyPI packaging withhatchlingbuild backend