Skip to content

feat!: #189 improve whitespace handling#191

Merged
noahbald merged 1 commit intomainfrom
feat/189-improve-whitespace-handling
Nov 20, 2025
Merged

feat!: #189 improve whitespace handling#191
noahbald merged 1 commit intomainfrom
feat/189-improve-whitespace-handling

Conversation

@noahbald
Copy link
Owner

@noahbald noahbald commented Nov 20, 2025

Description

This PR improves how whitespace is handled while writing SVG documents so that redundant whitespace is omitted.

Motivation and Context

Previously whitespace would be conservatively retained, causing files to be larger than necessary.

How Has This Been Tested?

  • Unit tests
  • w3c & oxygen

Types of changes

Features

  • Removes redundant whitespace while printing SVG document
  • Added handling for xml:space="preserve"

Breaking changes

  • Defaults of xmlwriter options updated to remove whitespace by default
  • TrimWhitespace renamed to Space, updated variants

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@noahbald noahbald self-assigned this Nov 20, 2025
@noahbald noahbald merged commit 704cf72 into main Nov 20, 2025
21 checks 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.

1 participant