Skip to content

fix(markdown): hide URL suffix for concealed links#866

Open
brendandebeasi wants to merge 1 commit intoanomalyco:mainfrom
brendandebeasi:fix/conceal-link-url
Open

fix(markdown): hide URL suffix for concealed links#866
brendandebeasi wants to merge 1 commit intoanomalyco:mainfrom
brendandebeasi:fix/conceal-link-url

Conversation

@brendandebeasi
Copy link
Copy Markdown

Summary

  • Remove redundant (url) suffix from concealed markdown links — the link text is already an OSC 8 hyperlink (Cmd/Ctrl+click), so displaying the raw URL is unnecessary
  • Update two existing tests to match the new concealed link output

Context

When conceal is enabled, markdown links [text](url) render as text (https://...). Since the link text already carries the linkHref for OSC 8 terminal hyperlinks, the parenthesized URL is redundant visual noise. This change makes concealed links render as just text — clickable via Cmd/Ctrl+click in supporting terminals.

The non-concealed (conceal=false) path is unchanged and still shows the full [text](url) syntax.

Concealed markdown links rendered as 'text (url)' even though the link
text is already an OSC 8 hyperlink (Cmd/Ctrl+click). Remove the
redundant ' (url)' suffix when conceal is enabled so only the clickable
link text is shown.
@AnatoleLucet
Copy link
Copy Markdown

AnatoleLucet commented Mar 28, 2026

maybe this could be an option instead of the default?

for instance a new concealUrl: boolean options similar to concealCode: boolean:

  • concealUrl: true -> <label>
  • concealUrl: false -> <label> (<url>)

would still allow links to work on terminals that don't support OSC8 like today when false, and it wouldn't be a breaking change either :)

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.

2 participants