fix(slack): broaden bold-text zero-width-space guard to all non-word chars - #35144
Closed
gonzalofrancoceballos wants to merge 1 commit into
Closed
Conversation
…chars Slack's mrkdwn parser silently truncates messages when a closing * follows a non-word character — not just )]} but also ., :, —, etc. Previously only handled )]}. Now guards against any character that isn't alphanumeric or underscore.
Contributor
|
Thanks for tracking the Slack formatting edge case. The corresponding formatter is still present on current main, but this patch no longer targets the active code. Problems
Suggested changes
Automated hermes-sweeper review. |
teknium1
pushed a commit
that referenced
this pull request
Jul 23, 2026
…d chars Slack's mrkdwn parser can fail to recognize the closing * of a bold span when it is immediately preceded by a non-word character (), ], }, ., :, em-dash, ...), mis-rendering the span and in reported cases truncating the rest of the message. Insert a zero-width space (U+200B) between the last character and the closing * whenever the last character is not alphanumeric or underscore. Reapplied from #35144 by @gonzalofrancoceballos — the original patched gateway/platforms/slack.py, which was migrated to plugins/platforms/slack/adapter.py in the plugin migration.
teknium1
pushed a commit
that referenced
this pull request
Jul 23, 2026
…d chars Slack's mrkdwn parser can fail to recognize the closing * of a bold span when it is immediately preceded by a non-word character (), ], }, ., :, em-dash, ...), mis-rendering the span and in reported cases truncating the rest of the message. Insert a zero-width space (U+200B) between the last character and the closing * whenever the last character is not alphanumeric or underscore. Reapplied from #35144 by @gonzalofrancoceballos — the original patched gateway/platforms/slack.py, which was migrated to plugins/platforms/slack/adapter.py in the plugin migration.
teknium1
pushed a commit
that referenced
this pull request
Jul 23, 2026
…d chars Slack's mrkdwn parser can fail to recognize the closing * of a bold span when it is immediately preceded by a non-word character (), ], }, ., :, em-dash, ...), mis-rendering the span and in reported cases truncating the rest of the message. Insert a zero-width space (U+200B) between the last character and the closing * whenever the last character is not alphanumeric or underscore. Reapplied from #35144 by @gonzalofrancoceballos — the original patched gateway/platforms/slack.py, which was migrated to plugins/platforms/slack/adapter.py in the plugin migration.
Contributor
|
Merged via #70191 — your commit was cherry-picked/reapplied onto current main with your authorship preserved in git history: your ZWSP bold guard was reapplied — premise note: no prior guard existed, yours ADDS it. Thanks for the contribution! |
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
…d chars Slack's mrkdwn parser can fail to recognize the closing * of a bold span when it is immediately preceded by a non-word character (), ], }, ., :, em-dash, ...), mis-rendering the span and in reported cases truncating the rest of the message. Insert a zero-width space (U+200B) between the last character and the closing * whenever the last character is not alphanumeric or underscore. Reapplied from NousResearch#35144 by @gonzalofrancoceballos — the original patched gateway/platforms/slack.py, which was migrated to plugins/platforms/slack/adapter.py in the plugin migration.
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.
Slack's mrkdwn parser silently truncates messages when a closing * follows a non-word character — not just )]} but also ., :, —, etc.
Previously only guarded against )]}. Now guards against any character that isn't alphanumeric or underscore by inserting a zero-width space (U+200B) before the closing *.