Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/markitdown/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies = [
[project.optional-dependencies]
all = [
"python-pptx",
"mammoth~=1.11.0",
"mammoth~=1.13.0",
"pandas",
"openpyxl",
"xlrd",
Expand All @@ -52,7 +52,7 @@ all = [
"azure-identity",
]
pptx = ["python-pptx"]
docx = ["mammoth~=1.11.0", "lxml"]
docx = ["mammoth~=1.13.0", "lxml"]
xlsx = ["pandas", "openpyxl"]
xls = ["pandas", "xlrd"]
pdf = ["pdfminer.six>=20251230", "pdfplumber>=0.11.9"]
Expand Down
13 changes: 13 additions & 0 deletions packages/markitdown/tests/test_docx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1485,5 +1485,18 @@ def test_convert_docx_with_style_missing_type(tmp_path):
assert "# Abstract" in result.markdown


@pytest.mark.parametrize("kind", ["separate", "end"])
def test_unmatched_field_marks_do_not_stop_conversion(kind: str) -> None:
body = _paragraph(
_text("Reset value ")
+ f'<w:r><w:fldChar w:fldCharType="{kind}"/></w:r>'
+ _text("is 0x0.")
)

result = DocxConverter().convert(_docx(body), _INFO)

assert result.markdown.strip() == "Reset value is 0x0."


if __name__ == "__main__":
raise SystemExit(pytest.main([__file__]))