Skip to content

feat: expose subscript and superscript markers in CLI and MCP - #2492

Open
Çağdaş Yürekli (cagdasyurekli) wants to merge 1 commit into
microsoft:mainfrom
cagdasyurekli:feat/inline-formatting-1217-20260914
Open

Çağdaş Yürekli (cagdasyurekli) wants to merge 1 commit into
microsoft:mainfrom
cagdasyurekli:feat/inline-formatting-1217-20260914

Conversation

@cagdasyurekli

@cagdasyurekli Çağdaş Yürekli (cagdasyurekli) commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Fixes #1217.

The Python API already forwards markdownify's sub_symbol and sup_symbol options for DOCX, but the CLI and MCP tool do not expose them. Add --sub-symbol / --sup-symbol to the CLI and optional string arguments with the same names to convert_to_markdown, and document all three interfaces.

For example, a DOCX containing subscript/superscript runs can now produce H<sub>2</sub>O and x<sup>2</sup> through the CLI or MCP instead of H2O and x2. Both file and stdin CLI input are supported. Omitting the options preserves current behavior; custom markers and explicit empty strings are supported. This closes the remaining interface/discoverability gap described in the issue discussion without adding another converter or changing PDF/cloud extraction.

Validation on Python 3.12:

  • GITHUB_ACTIONS=true hatch test --python 3.12 -q --tb=short: 871 passed, 43 skipped (the repository's conditional skips).
  • CLI suite: 11 passed, including real minimal DOCX conversions from both files and stdin with default, HTML, custom, and empty markers.
  • Full MCP suite: 22 passed, including real stdio tool discovery and calls, optional schema fields, null/default arguments, existing protocol compatibility, HTTP transports, and error handling.
  • pre-commit run --all-files and git diff --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.

Exposing markdownify options in the docx converter

1 participant