[PR #707] fix(markdown): skip redundant href in conceal mode for autolinks #1508

Open
opened 2026-03-14 09:40:36 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/707
Author: @mocksoul
Created: 2/19/2026
Status: 🔄 Open

Base: mainHead: fix/conceal-link-dedup


📝 Commits (2)

  • 3bf871b fix(markdown): skip redundant href in conceal mode for autolinks
  • 59995cd test: update snapshot for incomplete link after conceal fix

📊 Changes

2 files changed (+9 additions, -5 deletions)

View changed files

📝 packages/core/src/renderables/Markdown.ts (+8 -3)
📝 packages/core/src/renderables/__tests__/Markdown.test.ts (+1 -2)

📄 Description

When conceal mode renders a link where the label text equals the href (e.g. bare URLs and autolinks), the URL was displayed twice:

https://example.com (https://example.com)

This adds a check to skip the (href) suffix when the label matches the URL. Named links like [docs](https://example.com) still render as docs (https://example.com).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/707 **Author:** [@mocksoul](https://github.com/mocksoul) **Created:** 2/19/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/conceal-link-dedup` --- ### 📝 Commits (2) - [`3bf871b`](https://github.com/anomalyco/opentui/commit/3bf871baaf9a057265277df8320d2559b9e25339) fix(markdown): skip redundant href in conceal mode for autolinks - [`59995cd`](https://github.com/anomalyco/opentui/commit/59995cd7ead844415d5c02ff73998e4a0a69da06) test: update snapshot for incomplete link after conceal fix ### 📊 Changes **2 files changed** (+9 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/renderables/Markdown.ts` (+8 -3) 📝 `packages/core/src/renderables/__tests__/Markdown.test.ts` (+1 -2) </details> ### 📄 Description When conceal mode renders a link where the label text equals the href (e.g. bare URLs and autolinks), the URL was displayed twice: ``` https://example.com (https://example.com) ``` This adds a check to skip the `(href)` suffix when the label matches the URL. Named links like `[docs](https://example.com)` still render as `docs (https://example.com)`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1508
No description provided.