-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
buildRelated to the build systemRelated to the build system
Description
Describe the bug
If Markdown contains images without explicit width and height, the browser cannot determine the image dimensions until they are loaded or retrieved from cache. Consequently, anchor links may point to the wrong position on the page, sometimes resulting in the target header being hidden or misaligned.
Related issue in Mergin Maps docs:
Reproduction
Open page with images
Save anchor link
clean image cache in a browser
open link in new tab
Expected behavior
anchor links works on pages with images.
System Info
System:
OS: Linux 6.16 Pop!_OS 22.04 LTS
CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
Memory: 5.61 GB / 31.05 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 18.20.4 - /home/marcelkocisek/.nodenv/versions/18/bin/node
Yarn: 1.22.22 - /usr/bin/yarn
npm: 10.7.0 - /home/<>/.nodenv/versions/18/bin/npm
Browsers:
Firefox: 143.0.3
Firefox Developer Edition: 143.0.3
npmPackages:
vitepress: ^1.6.3 => 1.6.3
Additional context
Is there any workaround or script to prevent mentioned behavior?
Validations
- Check if you're on the latest VitePress version.
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
buildRelated to the build systemRelated to the build system