You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug: Markdown link input causes temporary text invisibility
Problem: When creating a link using [text](url), the link text becomes invisible after typing ( and pasting the URL. It only reappears after the closing ) is typed.
Steps to reproduce:
Type [Example](
Paste or type a URL
Notice that Example disappears
Type ) — Example reappears
Expected behavior: Text should remain visible during input, with link styling applied only after the syntax is complete.
Cause: The Markdown renderer likely treats incomplete links as invalid and hides them until the syntax is fully closed.
Suggested fix: Render link text as plain text during input, and only apply link styling when the URL is complete.
Fixed in a4c8b9a (shipping in 2.18.0). Thanks for the clear repro steps, they pointed straight at it.
Your diagnosis was right, and there turned out to be two separate causes behind the one symptom:
1. The brackets collapsed too early. While the target is unclosed, the Markdown parser ends the Link node at the ], so [Example]( parses as Link[0,9] with the ( as ordinary text. Live preview hides the [ and ] whenever the cursor is not inside the Link range, and a cursor sitting in the half-typed target is outside it. So the line rendered as Example(.
2. The pasted URL vanished outright. A URL typed or pasted after that ( parses as an autolink hanging off the paragraph, not as the link destination. The rule for hiding a destination URL was "it follows a (", which that autolink also satisfies, so the URL got hidden too. That is the disappearing text you saw: [Example](https://example.com rendered as just Example(.
The fix, close to what you suggested: a [label]( with no matching ) yet is not treated as a link at all, so it stays as plain source while you type or paste, and only collapses once the syntax is complete. Hiding a destination URL now also requires it to actually be part of the link node. Parens are counted rather than stopping at the first ), so a destination like https://en.wikipedia.org/wiki/Foo_(bar is still recognised as unterminated.
Same change fixed a related case nobody had filed: a bare URL in parentheses, a (https://parens.example) b, used to render as a () b.
Completed links behave exactly as before: [label](url) still collapses to just the label once the cursor leaves the line.
Verified in the running desktop app at default settings, plus 6 new regression tests.
One note that may explain why not everyone hits this: auto-pairs (on by default) turns ( into () as you type, which parses as a complete link right away and hides the bug. It shows up with auto-pairs off, or when editing an existing link where the ) is briefly missing.
Activity
adibhanna commentedon Jul 24, 2026
Fixed in a4c8b9a (shipping in 2.18.0). Thanks for the clear repro steps, they pointed straight at it.
Your diagnosis was right, and there turned out to be two separate causes behind the one symptom:
1. The brackets collapsed too early. While the target is unclosed, the Markdown parser ends the
Linknode at the], so[Example](parses asLink[0,9]with the(as ordinary text. Live preview hides the[and]whenever the cursor is not inside theLinkrange, and a cursor sitting in the half-typed target is outside it. So the line rendered asExample(.2. The pasted URL vanished outright. A URL typed or pasted after that
(parses as an autolink hanging off the paragraph, not as the link destination. The rule for hiding a destination URL was "it follows a(", which that autolink also satisfies, so the URL got hidden too. That is the disappearing text you saw:[Example](https://example.comrendered as justExample(.The fix, close to what you suggested: a
[label](with no matching)yet is not treated as a link at all, so it stays as plain source while you type or paste, and only collapses once the syntax is complete. Hiding a destination URL now also requires it to actually be part of the link node. Parens are counted rather than stopping at the first), so a destination likehttps://en.wikipedia.org/wiki/Foo_(baris still recognised as unterminated.Same change fixed a related case nobody had filed: a bare URL in parentheses,
a (https://parens.example) b, used to render asa () b.Completed links behave exactly as before:
[label](url)still collapses to just the label once the cursor leaves the line.Verified in the running desktop app at default settings, plus 6 new regression tests.
One note that may explain why not everyone hits this: auto-pairs (on by default) turns
(into()as you type, which parses as a complete link right away and hides the bug. It shows up with auto-pairs off, or when editing an existing link where the)is briefly missing.Fix(editor): keep a half-typed markdown link visible while its target…
SandeepKumarKuanar commentedon Jul 25, 2026
thank you so much for listening to me
Fix(editor): markdown links with spaced targets render like links (#617)