Skip to content

Conversation

@Lurkerpas
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds markdown to DOCX conversion functionality (feature MBEP#314) by integrating an adapted version of the md2docx-python library and introducing a postprocessor architecture to handle multiple output formats.

  • Added markdown to DOCX conversion capability using an extracted and adapted version of the md2docx-python library
  • Introduced a postprocessor architecture with support for multiple output formats (none/passthrough, md2docx, md2html)
  • Updated CLI to support postprocessing options and refactored output handling to use the new postprocessor system

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
tests/test_md2docx.py New test file with comprehensive tests for markdown to DOCX conversion including text, lists, tables, and headers
tests/Makefile Added test_md2docx.py to the test suite
templateprocessor/postprocessor.py New module defining postprocessor architecture with abstract base class and concrete implementations for MD2DOCX, MD2HTML, and passthrough processing
templateprocessor/md2docx.py New module containing markdown to DOCX conversion logic extracted from md2docx-python project with modifications for text input and enhanced table support
templateprocessor/cli.py Updated to integrate postprocessor system, added postprocessing CLI argument, and refactored output generation to use postprocessors
setup.py Added dependencies for python-docx, bs4, and markdown2 packages
requirements.txt Added the same dependencies to requirements file
examples/generate_so_list.sh Added example command demonstrating md2docx postprocessing
examples/generate_ecss_demo.sh Refactored script to use loop and added md2docx and md2html postprocessing examples
LICENSE.MD2DOCX Added MIT license file for the adapted md2docx-python code
Comments suppressed due to low confidence (1)

tests/test_md2docx.py:26

  • This assignment to 'paragraphs' is unnecessary as it is redefined before this value is used.
        paragraphs = [p.text for p in doc.paragraphs if p.text.strip()]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Lurkerpas and others added 7 commits December 11, 2025 21:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Lurkerpas Lurkerpas merged commit 368633a into main Dec 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants