Skip to content

feat: implement md-to-word-swift converter #54

@PsychQuantClaw

Description

@PsychQuantClaw

Summary

md-to-word-swift needs a follow-up implementation pass because the package exists on main, but the tracked source/tests are missing. We need the direct Markdown → Word (.docx) converter restored as a proper Layer 3 package.

Requirements

  • Implement md-to-word-swift as a direct Markdown AST → OOXML .docx converter
  • Preserve headings, paragraphs, emphasis, links, lists, code blocks, tables, and frontmatter-derived document metadata
  • Keep the package independent and compatible with the existing MacDocCLI command surface

Layer 1 / dependency plan

  • swift-markdown for Markdown AST parsing
  • ooxml-swift for .docx generation
  • doc-converter-swift for DocumentConverter / StreamingOutput protocol integration

Implementation shape

  • Add a DocumentConverter conformer for Markdown → Word output
  • Emit .docx bytes through the streaming architecture instead of routing through another converter
  • Wire the package into MacDocCLI with the existing markdown → word command path

Test strategy

  • Package-level unit tests for heading/list/table/link/code-block/frontmatter mapping
  • Smoke test that generates a .docx and validates key OOXML/document metadata round-trips
  • Keep package-local coverage above 80%

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions