Skip to content

馃悰 fix: keep apostrophes in help text intact - #349

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:help-apostrophes
Aug 27, 2026
Merged

馃悰 fix: keep apostrophes in help text intact#349
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:help-apostrophes

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Aug 27, 2026

Copy link
Copy Markdown
Member

A help string such as don't use it's value rendered as don't use it's value. Under -W the build failed with Inline literal start-string without end-string. The quote substitution in load_help_text matched two single quotes as a quoted span wherever they appeared, so the apostrophes in don't and it's paired up with each other. 馃悰

The single- and double-quote patterns now require the opening quote to follow a non-word character and the closing quote to precede one, which is how a quoted span differs from an apostrophe glued to a word. it's a 'thing' to see keeps its apostrophe and still wraps 'thing' in an inline literal; 'a' and 'b' still wraps each span on its own.

One spelling changes: a quoted fragment that ends in a word character, for example 'foo'bar, no longer gets wrapped, since it did not read as a quote.

@gaborbernat gaborbernat added the bug Something isn't working label Aug 27, 2026
The quote substitution matched any pair of single quotes as a quoted
span, so help such as "don't use it's value" paired the apostrophes of
don't and it's, produced a broken inline literal and failed builds run
with -W.

Both quote patterns now demand a non-word character before the opening
quote and after the closing one, which separates a quoted span from an
apostrophe inside a word while keeping 'thing' and "thing" wrapped.
@gaborbernat
gaborbernat merged commit da0e46a into tox-dev:main Aug 27, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant