Skip to content

Fix unintended utf8.reverse argument - #2537

Open
meehl wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
meehl:fix-utf8-reverse
Open

meehl wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
meehl:fix-utf8-reverse

Conversation

@meehl

@meehl meehl commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

utf8.gsub returns both the substituted string and the number of substitutions. Since the gsub calls are passed directly to utf8.reverse, both return values get forwarded, so the substitution count ends up as the second argument which is then interpreted as the optional lax argument.

This wraps the gsub calls in parentheses so only the substituted string is passed to utf8.reverse.

Wrap gsub calls in parentheses to prevent the substitution count from
being passed as the second argument to utf8.reverse.
@meehl

meehl commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

This fix also needs to be applied to PoB1.

@vaisest vaisest added the pob1 Should also be merged into PoB1 Repo label Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pob1 Should also be merged into PoB1 Repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants