Skip to content

Conversation

@arthrod
Copy link

@arthrod arthrod commented Jan 9, 2026

Summary

  • Adds strikethrough formatting support for the <del> HTML element
  • Maps <del> to font.strike = True, same as existing <s> tag support

Background

The <del> HTML element represents text that has been deleted from a document. While <s> is already supported for strikethrough, <del> was missing. Both tags semantically represent struck-through text per HTML specification.

Example:

<p>The price was <del>$100</del> now $80!</p>

Changes

  • Added 'del': 'strike' to FONT_STYLES in constants.py

Test plan

  • Verify <del>text</del> renders with strikethrough
  • Verify existing <s> tag still works
  • Verify nested tags work (e.g., <del><strong>text</strong></del>)

arthrod and others added 2 commits January 8, 2026 22:17
Refactor HTML-to-DOCX with centralized styles and test coverage
The <del> HTML element represents text that has been deleted from a
document. Like the existing <s> tag support, this maps to the
font.strike property in python-docx.

This is consistent with HTML semantics where both <del> and <s>
represent struck-through text.
@dfop02
Copy link
Owner

dfop02 commented Jan 11, 2026

This PR is fine, please just include the new <del> tag to tests and also the change on HISTORY.rst.

@dfop02 dfop02 self-requested a review January 11, 2026 21:16
@dfop02 dfop02 added New Feature New feature or request good first issue Good for newcomers labels Jan 11, 2026
@dfop02 dfop02 changed the base branch from main to release/1.1.4 January 12, 2026 11:57
@dfop02 dfop02 self-assigned this Jan 14, 2026
@dfop02
Copy link
Owner

dfop02 commented Jan 25, 2026

hey @arthrod , Just a kindly reminder. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers New Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants