fix(formatter): remove stray space breaking mochi profile links - #47
Merged
Conversation
The mochi() profile renderer built masked links as [label](HOMEPAGE /profile/id) with a space inside the URL. Discord refuses to parse masked links whose URL contains a space, so transaction rows fell back to raw markdown text, e.g. [mochi:Auto Rewards](https://mochi.gg /profile/...). Same copy-paste bug existed in mochi-id. Also drops the trailing spaces in the plain and url fields. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 17, 2026
tieubao
added a commit
to consolelabs/mochi-discord
that referenced
this pull request
Jul 17, 2026
) mochi-formatter <=20.0.11 builds mochi() profile links with a stray space in the URL, so Discord shows raw [label](url) text in the balance embed's Recent Transactions. Upstream fix is merged (consolelabs/mochi.js#47) but npm publish is blocked on the single npm maintainer, so patch the installed dist at image build; the sed is a no-op once formatter >=20.0.12 ships, then remove it. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
tieubao
pushed a commit
to consolelabs/mochi-discord
that referenced
this pull request
Jul 17, 2026
## [6.58.18](v6.58.17...v6.58.18) (2026-07-17) ### Bug Fixes * **docker:** patch formatter dist to unbreak profile masked links ([#1737](#1737)) ([3e9cf4f](3e9cf4f)), closes [consolelabs/mochi.js#47](consolelabs/mochi.js#47)
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.
What
Remove a stray space inside the profile URL of masked links built by the
mochi()profile renderer (mochi-formatter + same copy-paste bug in mochi-id).Why
Discord refuses to parse a masked link whose URL contains a space, so transaction rows in the balance embed fell back to raw markdown text:
while vault/app profiles (different renderers, no space) rendered fine.
How
${HOMEPAGE} /profile/${p.id}->${HOMEPAGE}/profile/${p.id}in thevalueandurlfields, plus dropping trailing spaces inplain/url.🤖 Generated with Claude Code