Releases: JeelGajera/jspdf-md-renderer
Releases · JeelGajera/jspdf-md-renderer
v3.1.0
What's Changed
- fix(renderer): Correct indentation level calculation for nested list items. by @JeelGajera in #42
- feat(build): Add UMD build output and document browser runtime usage. by @JeelGajera in #43
Full Changelog: v3.0.1...v3.1.0
v3.0.1
What's Changed
- chore: bump runtime and tooling dependencies by @JeelGajera in #39
- chore(deps-dev): bump @eslint/js from 9.39.2 to 10.0.1 by @dependabot[bot] in #38
- chore(deps-dev): bump eslint from 9.39.2 to 10.0.0 by @dependabot[bot] in #37
Full Changelog: v3.0.0...v3.0.1
v3.0.0
✨ Highlights
- Justified text rendering with mixed inline styles
- Accurate layout tracking for blockquotes, code blocks, and images
- Improved pagination and spacing consistency across the renderer
- Updated PDF example showcasing real-world text justification
- Upgraded to jsPDF v4
🚀 What’s New
Justified Mixed Inline Text
- Proper justification for paragraphs containing bold, italic, bold-italic,
inline code, and links - Even spacing across lines while preserving inline styles
- Natural (non-justified) rendering for the final line of paragraphs
Text Alignment Support
-
New
content.textAlignmentoption:left·right·center·justify
-
Applied consistently to paragraphs, lists, and raw markdown content
🧠 Rendering Improvements
Layout Accuracy
- Renderer now tracks the actual visual bottom of rendered content
- Fixes extra spacing, overlap issues, and incorrect page breaks
- Containers like blockquotes and code blocks now occupy correct vertical space
Code Blocks
- Monospace font applied before measurement for accurate wrapping
- Cleaner pagination across pages
- Precise background sizing with reduced whitespace
- Improved language label placement
Headings, Blockquotes & Images
- Tighter and more predictable heading spacing
- Blockquotes correctly measure their content height
- Images no longer add unintended extra spacing
📋 Lists & Raw Content
- Proper bullet and numbering alignment
- Justified text support inside list items
- Smarter handling of whitespace and blank lines in raw markdown
⚙️ New Configuration
Inline Code Styling
codespan?: {
backgroundColor?: string;
padding?: number;
showBackground?: boolean;
fontSizeScale?: number;
}🔧 Dependencies
- jsPDF upgraded to
v4 - Supporting dependencies updated for compatibility
📝 Notes
- No breaking API changes
- Output layout may differ slightly due to improved measurement and spacing logic
Full Changelog: v2.0.0...v3.0.0
v2.0.0
v2.0.0: Major Feature Update 🚀
This major release introduces robust support for advanced Markdown elements, significant rendering improvements.
✨ New Features
- Tables Support: Added full support for rendering Markdown tables with custom styling options.
- Blockquotes: Implemented blockquote rendering with support for multi-page spanning and nested elements.
- Inline Code (
codespan): Added distinct styling for inline code snippets with background highlights and monospace fonts.
🛠 Improvements & Fixes
- Enhanced Page Breaks:
- Code Blocks: Fixed an issue where background rectangles for code blocks would spill over into the footer during page breaks.
- Paragraphs: improved text wrapping and justification logic for better multi-page flows.
📦 Breaking Changes
- Version 2.0.0: While the API remains backward compatible, the internal rendering logic for paragraphs and code blocks has been significantly overhauled to support complex layouts. This may result in slight visual differences in existing PDFs, justifying the major version bump.
Full Changelog: v1.8.3...v2.0.0
v1.8.3
What's Changed
- chore(deps-dev): bump @types/node from 22.15.32 to 24.0.3 by @dependabot[bot] in #24
- chore(deps-dev): bump vite from 6.3.5 to 7.0.4 by @dependabot[bot] in #28
- chore(deps): bump marked from 15.0.12 to 16.0.0 by @dependabot[bot] in #26
Full Changelog: v1.8.2...v1.8.3