Open yokaiichi opened 6 days ago
Some findings based on fixtures/demo/fixture.mdx
, where |
represents the cursor position:
#
character does trigger completions..mdx
files ([](./fixtures.mdx#|
).md
files ([](../../README.md#|
)[](#|
)Hi! This was marked as ready to be worked on! Note that while this is ready to be worked on, nothing is said about priority: it may take a while for this to be solved.
Is this something you can and want to work on?
Team: please use the area/*
(to describe the scope of the change), platform/*
(if this is related to a specific one), and semver/*
and type/*
labels to annotate this. If this is first-timers friendly, add good first issue
and if this could use help, add help wanted
.
Not sure exactly what you mean with the first bullet, but it's outside the scope of the problem I reported anyway. Which revolves around what you've partially confirmed in the 3rd and 4th bullets.
However, there is one other aspect of my reported behavior that isn't reflected in your findings (yet):
[](../../README.md##|)
- Note the double-hash trigger.[](##|)
- Note the double-hash trigger.Both your 3rd and 4th bullets, and these two just above, work correctly for .md
files in VSCode.
Initial checklist
Affected packages and versions
MDX unified v1.8.11
Link to runnable example
No response
Steps to reproduce
On a Mac system, install VSCode 1.94.0 or later, and install the MDX unified Extension v1.8.11.
In a repo, create two sibling folders. In one folder place two files A.mdx and B.mdx. In the other folder place a single file C.mdx.
In A.mdx create several different ## sections and dummy paragraphs in each section. Do the same for B.mdx and C.mdx.
In A.mdx, in any paragraph, add an empty Markdown link
[anchorText]()
. Place your cursor in the empty link destination delimiters()
, trigger IntelliSense autocomplete (Control + Space) and type#
to attempt to view autocomplete link paths to headers within the same A.mdx file. Nothing will happen; IntelliSense is not recognizing the#
trigger.Try a variation of this by removing the
#
and this time typing two hash marks##
to attemp to view autocomplete link paths to headers across ALL files including B.mdx and C.mdx. Nothing will happen; IntelliSense is not recognizing the##
trigger.Now try all this again with three non-MDX files A.md, B.md, and C.md. You'll see that IntelliSense fully recognizes and acts on both the
#
and##
triggers in regular .md files.Expected behavior
IntelliSense recognizes both
#
and##
triggers for link path completion behavior, exactly as it does in regular .md files.Additional details from Discussion in mdx-js
Actual behavior
IntelliSense does absolutely nothing in response to
#
and##
triggers for link path completion in .mdx files, even with the most recent (v1.8.11) MDX unified Extension installed in the most recent version of VSCode (v1.94.0) for Mac.Affected runtime and version
node v20.18.0
Affected package manager and version
npm v10.9.0
Affected OS and version
macOS Sonoma 14.6.1
Build and bundle tools
Docusaurus