Skip to content

feat: add subscript & superscript formatting #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2025

Conversation

vagenas
Copy link
Collaborator

@vagenas vagenas commented Jun 5, 2025

Added subscript & superscript support, for now only leveraged in HTML (the Markdown syntax seems to be "uncommon" & won't render e.g. on VS Code).

Copy link

mergify bot commented Jun 5, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

🟢 Require two reviewer for test updates

Wonderful, this rule succeeded.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

Copy link
Contributor

@PeterStaar-IBM PeterStaar-IBM left a comment

Choose a reason for hiding this comment

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

see comment

@@ -836,6 +836,8 @@ class Formatting(BaseModel):
italic: bool = False
underline: bool = False
strikethrough: bool = False
subscript: bool = False
Copy link
Contributor

Choose a reason for hiding this comment

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

this will need to be an enum: you can not have subscript and superscript equal to false.

Signed-off-by: Panos Vagenas <[email protected]>
@vagenas vagenas requested a review from PeterStaar-IBM June 5, 2025 19:06
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
docling_core/transforms/serializer/base.py 66.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@PeterStaar-IBM PeterStaar-IBM left a comment

Choose a reason for hiding this comment

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

awesome!

@vagenas vagenas merged commit ae96129 into main Jun 6, 2025
11 checks passed
@vagenas vagenas deleted the add-subscript-superscript branch June 6, 2025 07:01
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.

3 participants