Skip to content

Fix line breaking in HTML exports #30

Description

@schuyler

Problem

Long lines in Markdown do not wrap properly when exporting to HTML. Text continues as a single line without breaking, creating poor readability in the exported output.

Solution

Add the CSS property word-break: break-word; to paragraph tags in the HTML export template to enable proper text wrapping for lengthy content.

Implementation Approach

This is a minimal, CSS-based solution that affects visual presentation without altering the underlying Markdown parsing or content structure. The fix should be applied to HTML export templates/styling.

Source

Based on PR #1320 from MacDownApp/macdown by @radicm
MacDownApp/macdown#1320

Note: PR #1319 appears to be a duplicate of this same fix.

Priority

MEDIUM - HTML export is a key feature, and proper text wrapping is essential for document readability.

Implementation Notes

  • Update HTML export templates with proper word-breaking CSS
  • Test with long lines and various content types
  • Verify exported HTML displays correctly in different browsers

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcloned-prexportPDF/HTML exportmediumShould do, moderate impact

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions