Skip to content

Commit 6faab80

Browse files
fix: Doc Maker content duplication bug and add nested/parenthesized list support (#321)
* Don't recursively step down into elements within a list item. This fixes an issue where content in lists were being duplicated * Initial support for nested lists * Initial look at supporting (1), (a) and (i) as numbered lists * Slightly fixed the issue where numbering was not being displayed in some cases * Fix a bug where if there is a second list, then the numbers for the first list don't display * Test different numbered formats and fix issues along the way * consistent indenting * Fix double indentation of the first nested list and wrote a unit test * Restore the ability for a list numbering to cross over multiple sections * Don't need the zip packages in the codebase * Fix repository validation checks * Test edge case where paragraphs before lists sometimes don't get included in the document * Fix the bug where paragraphs before lists sometimes don't appear in the document * unit test for an alphabet list not transofmring into a roman numerals list * Fix bug where an alphabet list was transforming into a roman numerals list * unit test for 100 roman numerals * Full roman numeral support to pass the previous unit test * Update alphabet test to check that none of the characters are getting mixed up with roman numerals * doesn't belong in codebase * fix the formatting to pass validation * format again with the correct line-length option this time * Fix warnings * Unit test for capital letter numbered lists * Fix capital letter numbered list * python -m ruff format --line-length 120 doc-maker * Unit test to reproduce issue with disappearing paragraph between list items with no new lines in-between * Fix the bug where a paragraph between list items was disappearing * ah yes, need to format the files again * This is a feature enhancement and bug fixes, not a breaking change
1 parent ff1d164 commit 6faab80

4 files changed

Lines changed: 1921 additions & 17 deletions

File tree

doc-maker/config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Doc Maker",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Word document automation integration using python-docx with markdown-first content creation. AI agents should use markdown syntax for most content creation - headings (#), paragraphs, lists (- or 1.), formatting (**bold**, *italic*), tables, blockquotes (>), and code blocks. Only use non-markdown actions for images, page breaks, or when you need direct table creation with structured data arrays.",
55
"entry_point": "doc_maker.py",
66
"actions": {
@@ -10,6 +10,10 @@
1010
"input_schema": {
1111
"type": "object",
1212
"properties": {
13+
"title": {
14+
"type": "string",
15+
"description": "Optional title for the document. Added as a heading if no markdown content is provided"
16+
},
1317
"markdown_content": {
1418
"type": "string",
1519
"description": "Markdown content to convert to Word document format. Use standard markdown: # for headings, **bold**, *italic*, - for bullets, 1. for numbers, | tables |, > blockquotes, ```code blocks```"

0 commit comments

Comments
 (0)