Skip to content

Markdown deep nav doesn't work if fragment is a literal with spaces #310682

@gmccullo

Description

@gmccullo

Type: Bug

Create a page like this:

# header 1

1. [literal 1](<#header 1>)
2. [encoded 1](#header-1)

Both links are valid. But only the 2nd one will navigate to header 1.

VS Code version: Code 1.116.0 (560a9db, 2026-04-15T00:28:13Z)
OS version: Windows_NT x64 10.0.26200
Modes:

System Info
Item Value
CPUs AMD Ryzen 7 3750H with Radeon Vega Mobile Gfx (8 x 2296)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x1002, DEVICE=0x15d8 [AMD Radeon(TM) RX Vega 10 Graphics], DRIVER_VENDOR=AMD, DRIVER_VERSION=31.0.21905.1001 ACTIVE
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8246
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 61.95GB (39.93GB free)
Process Argv --crash-reporter-id 2ba0f4e4-3510-454f-9af6-136975db26b9
Screen Reader no
VM 0%
Extensions disabled
A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
b6b4d950:31327385
6abeh943:31336334
envsdeactivate2:31464701
cloudbuttont:31379625
3efgi100_wstrepl:31403338
use-responses-api:31390855
je187915:31454425
ec5jj548:31422691
cp_cls_t_966_ss:31454198
4je02754:31466945
c3h7c220:31478652
ge8j1254_inline_auto_hint_haiku:31491242
38bie571_auto:31426784
cp_cls_c_1081:31454833
conptydll_true:31489736
e9c30283:31461165
test_treatment2:31471001
idci7584:31464702
e3e4d672:31494082
i54ji102:31458073
534a6447_copy:31478748
chat:31457767
cpptoolsoff-v2:31475362
inline_hover_fd9bg283:31492073
ec1eg703:31491645
client_tst_t:31495907
ddid_t:31478206
getcmakediagnosticsoff:31489825
cp_cls_c_1082:31491634
logging_disabled_new:31493366

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersmarkdownMarkdown support issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions