Repository navigation
Markdown links: [words](address) becomes the words, linked; after "(/" pages are suggested - #216
Merged
Merged
Conversation
…" pages are suggested
The link is laid over the words (they keep their bold, a mention in them); the "[" and
"](address)" go. Backspace straight after gives back what was typed. "[words](" shows a hint, and
"[words](/" suggests pages, spaces and all. Unsafe addresses, code, images and escaped brackets are
left alone, and the typography rules no longer change an address being typed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The last part of the links work, after the link editor (214) and page mentions (215).
Typing a link the Markdown way
[words](address)becomes the words, linked, as the)is typed. Backspace straight after gives back what was typed.[and](address)are taken away.example.comgetshttps://, andjavascript:and the like are left as typed.…/Mercury_(planet)) work, and a title after the address is allowed and left out. The words end at the first](, so one in a title doesn't move it.(the image rule's), after\[, or in[[(a mention).While typing
[words](shows a hint under the cursor, "Type an address, or / to link a page". Typing carries on in the page, and Enter is still a new line.[words](/suggests pages. Spaces are fine while a page matches (/Onboarding g). Picking one links the words to it, leaving nothing else. Escape hides the list, and the keys go back to the page.--to—,...,->,!=) skip an address being typed. They broke links.Shared with mentions
pageSuggestions.js: the page search and the suggestion pop-up.typingContext.js: the line before the cursor (its last 500 characters), unclosed inline code, and a link address being typed.markdownLinks.jsonly reads the line when there's a](in it.Not fixed: one stray backtick earlier in a line still turns this off for the rest of it. The typography rules have always done the same.
Tests:
e2e/markdown-links.spec.ts, 9 tests:--, a title with](, and an image.🤖 Generated with Claude Code