fix(auto-reply): preserve newlines in stripInlineStatus and extractInlineSimpleCommand#32224
Merged
steipete merged 2 commits intoopenclaw:mainfrom Mar 2, 2026
Conversation
Contributor
Greptile SummaryFixed a bug where Key Changes
The implementation is correct and well-tested. The regex pattern Confidence Score: 5/5
Last reviewed commit: 2c42930 |
…lineSimpleCommand The /\s+/g whitespace normalizer collapsed newlines along with spaces/tabs, destroying paragraph structure in multi-line messages before they reached the LLM. Use /[^\S\n]+/g to only collapse horizontal whitespace while preserving line breaks. Closes openclaw#32216 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2c42930 to
825d5aa
Compare
Contributor
|
Landed via temp rebase onto main.
Thanks @scoootscooob! |
planfit-alan
pushed a commit
to planfit/openclaw
that referenced
this pull request
Mar 3, 2026
dawi369
pushed a commit
to dawi369/davis
that referenced
this pull request
Mar 3, 2026
OWALabuy
pushed a commit
to kcinzgg/openclaw
that referenced
this pull request
Mar 4, 2026
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
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.
Summary
stripInlineStatus()andextractInlineSimpleCommand()used/\s+/gto normalize whitespace, which collapsed newlines along with spaces/tabs. This destroyed paragraph structure in multi-line messages from Discord (Shift+Enter) and other channels./[^\S\n]+/gto only collapse horizontal whitespace while preserving line breaks.Closes #32216
Test plan
/status)/statusdirective/helpcommand extraction preserves newlines🤖 Generated with Claude Code