馃悰 fix: keep apostrophes in help text intact - #349
Merged
Conversation
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
force-pushed
the
help-apostrophes
branch
from
August 27, 2026 16:09
d2e22f7 to
6d57543
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A help string such as
don't use it's valuerendered asdon't use it's value. Under-Wthe build failed withInline literal start-string without end-string. The quote substitution inload_help_textmatched two single quotes as a quoted span wherever they appeared, so the apostrophes indon'tandit'spaired 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 seekeeps 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.