Skip to content

Conversation

@lesliehc
Copy link

@lesliehc lesliehc commented Nov 30, 2025

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code. (poetry run black --check . passed)
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate (N/A for tests-only; maintainers may advise)
  • I've added tests for new code (this PR adds a single test)
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Add a focused unit test that asserts malformed markup with a mismatched closing tag
(e.g., "[bold]hello[/italic]") raises a MarkupError and that the message is
actionable. The assertions are intentionally flexible to avoid over-constraining the
exact wording while still guarding for helpful terms such as “invalid / mismatch /
closing / end tag”.

This is tests-only and does not change runtime behavior. It helps prevent future
regressions in error messaging clarity for invalid markup.

Relates to: #2993.

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.

1 participant