Commit Graph

3 Commits

Author SHA1 Message Date
Seth Hillbrand 77a212a72c Preserve multiple spaces inside markup during line-breaking
wordbreakMarkup() uses wxStringTokenizer to split text into words for
line-wrapping. When processing content inside markup nodes (overbar,
subscript, superscript), the tokenizer collapsed consecutive spaces
into a single space because wxTOKEN_RET_DELIMS skips empty tokens
between consecutive delimiters.

This caused textboxes to render "~{     }" as "~{ }" since textboxes
use LinebreakText() while regular text items do not.

Add an aInsideMarkup flag to skip tokenization for content nodes that
are children of markup nodes. Their content is concatenated verbatim
into the parent markup word, preserving all spaces.

Also fix width calculation for space-only tokens outside markup that
were getting zero width after Trim().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22913
2026-02-02 10:42:55 -08:00
Seth Hillbrand 0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Marek Roszko 8d4db2edf5 Move tests around 2023-04-24 22:09:36 -04:00