Repository navigation
fix(emoji): show custom emoji after a link that ends at CJK punctuation #2772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
cheng-block
wants to merge
22
commits into
block:main
Choose a base branch
from
cheng-block:cheng/fix-emoji-after-cjk-link
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
2398cb7
fix(emoji): show custom emoji after a link that ends at CJK punctuation
cheng-block d2df590
fix(emoji): keep tags unchanged for spaced, escaped and HTTPS:// links
cheng-block 4a9a14f
fix(emoji): find links with a case-sensitive scheme again
cheng-block 28a7361
fix(emoji): keep a URL nested in another link whole
cheng-block 6906428
fix(emoji): keep every URL inside a link destination whole
cheng-block b319962
fix(emoji): split every URL in a link destination as before
cheng-block 80bd8c0
fix(emoji): leave a scheme with nothing after it as text
cheng-block ecc8d5d
fix(emoji): keep escaped and Unicode-spaced URLs inside a destination
cheng-block 301ccf2
fix(emoji): use CommonMark whitespace for destination pieces
cheng-block e7815c9
fix(emoji): keep a reference definition's URL whole
cheng-block 6eac882
fix(emoji): keep a quoted or listed reference definition's URL whole
cheng-block 0d205e6
fix(emoji): find a reference definition after leading whitespace
cheng-block 62080fe
fix(emoji): keep an angle destination inside another destination whole
cheng-block 86eb30f
fix(emoji): find a link definition only after a line ending
cheng-block 5c51fa2
fix(emoji): drop the reference-definition guard
cheng-block 31c6441
fix(emoji): leave reference definitions out of emoji tags
cheng-block 9fb2009
fix(emoji): tag the stored text and split around definitions
cheng-block c3151a3
fix(emoji): find reference definitions in deeply nested Markdown
cheng-block 6a095e8
Merge upstream/main into cheng/fix-emoji-after-cjk-link
cheng-block a57a2fe
🤖 fix(emoji): keep a destination continued on a quoted line whole
cheng-block 708dc89
🤖 fix(emoji): tag a shortcode in a footnote again
cheng-block 994dcb4
🤖 fix(emoji): treat a footnote label with Unicode spaces as a footnote
cheng-block File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional subtraction. This guard is most of the PR's complexity and cost. It adds a Markdown parse on the send path, which runs twice on a ready-catalog send with
]:and a shortcode, and it grows thebuzz-mcpbundle by about 236 kB (+52 kB gzip, reproduced). The only case it covers is a shortcode after CJK punctuation inside a reference-definition URL, which renders nothing. The cold-catalog send wait it avoids still applies to code spans and quoted multiline destinations, which this PR accepts as known limits. Treating definitions the same way would let you dropsentParts,definitionRangesand the.trim()changes inmessages.ts, and keep only theBARE_URL_RESTsplit. If you keep the guard, it is correct as written, including the trim.