Skip to content

fix(mrkdwn): convert Slack angle-bracket links to Markdown for markdown block#504

Draft
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/mrkdwn-angle-bracket-links
Draft

fix(mrkdwn): convert Slack angle-bracket links to Markdown for markdown block#504
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/mrkdwn-angle-bracket-links

Conversation

@sentry-junior
Copy link
Copy Markdown
Contributor

@sentry-junior sentry-junior Bot commented Jun 3, 2026

Problem

The body is delivered as a Slack markdown block, which expects standard Markdown links ([label](url)). The model sometimes outputs Slack mrkdwn angle-bracket syntax (<URL> / <URL|label>) instead, which collides with bold markers and produces broken output:

**<https://github.com/getsentry/sentry/pull/116765**>

The closing ** gets absorbed inside the angle brackets; Slack parses the URL as https://url**.

Observed in production: this thread.

Fix

Normalize angle-bracket link syntax in renderSlackMrkdwn in three passes before delivery:

  1. Repair malformed bold-wrapped angle autolinks: **<URL**>[URL](URL)
  2. Slack labeled links: <URL|label>[label](URL)
  3. Remaining angle autolinks: <URL>[URL](URL)

Verification

27 unit tests pass. Typecheck clean.


View Session in Sentry

Action taken on behalf of Nick Meisenheimer.

…wn block

The body is delivered as a Slack `markdown` block, which expects standard
Markdown links ([label](url)). Using Slack mrkdwn angle-bracket syntax
(<URL>) collides with bold markers and produces malformed output like
**<https://url**> where the closing ** is absorbed inside the angle
brackets and Slack parses https://url** as the URL.

Normalize in three passes:
1. Repair malformed bold-wrapped angle autolinks: **<URL**> → [URL](URL)
2. Convert Slack labeled links: <URL|label> → [label](URL)
3. Convert remaining angle autolinks: <URL> → [URL](URL)

Refs: https://sentry.slack.com/archives/C03USURCFBJ/p1780496988280239

Co-authored-by: David Cramer <david@sentry.io>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 3, 2026 3:35pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants