Problem: HTML output contained broken image links because all formats
used the same full path (e.g., living-documentation/diagram-536389.png).
This worked for PDFs but failed for HTML since both files are in the
same directory and need relative paths.
Solution:
- Add output format detection with isHTMLOutput function
- Update processMermaidBlock to take OutputPath parameter
- Generate context-appropriate paths:
* HTML: relative path (diagram-536389.png)
* PDF: full path (living-documentation/diagram-536389.png)
- Update transformDocument and compilation functions to pass output path
Both HTML and PDF generation now work correctly with proper image embedding.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major improvements:
- Add custom DocsterError type with proper exception handling
- Introduce type-safe newtypes (SourceDir, OutputPath, DiagramId)
- Consistent Text usage throughout, eliminating String/Text mixing
- Extract LaTeX template generation into separate functions
- Add resource cleanup with bracket pattern for temporary files
- Improve function naming and comprehensive documentation
- Extract constants for better maintainability
- Remove all unused imports and fix compiler warnings
The refactored code maintains identical functionality while being
much more maintainable, type-safe, and following Haskell best practices.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add fancyvrb package and Shaded environment for syntax highlighting
- Include amsmath and amssymb packages for mathematical symbols
- Switch from pdflatex to xelatex with fontspec for Unicode support
- Add complete set of syntax highlighting commands for code blocks
- Fix directory-relative Mermaid file generation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update docster.cabal to modern format with GHC 9.12.2 compatibility
- Fix Mermaid code block detection using getDefaultExtensions
- Switch from SVG to PNG output for PDF compatibility
- Add CLAUDE.md with development instructions
- Update tooling from mise to ghcup for Haskell management
Known issues:
- Generated diagram files are created in root directory instead of alongside source files
- PDF generation fails with LaTeX errors for complex documents (missing \tightlist support)
- HTML output lacks proper DOCTYPE (quirks mode)
- Debug output still present in code
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>