Skip to content

[Bug report] Anchors for #### cannot be linked to #1

Open
@KnorpelSenf

Description

@KnorpelSenf

Description

Headers with 4 indents (#### Name) cannot be linked to by clicking the header anchor. This will scroll to the right position on mobile, but the URL will be set to the parent anchor. Links to the sections work, but once they're opened, they will be rewritten to the parent anchor.

Reproduction

https://grammy.dev/plugins/keyboard.html#example-1

Used Package Manager

npm

System Info

# This command fails
$ npx vuepress info
⠋ Collecting Environment InfoTypeError: envinfo.run is not a function
    at info (file:///home/steffen/git/grammy-website/site/node_modules/@vuepress/cli/dist/index.js:525:32)
    at CAC.wrappedCommand (file:///home/steffen/git/grammy-website/site/node_modules/@vuepress/cli/dist/index.js:584:39)
    at CAC.runMatchedCommand (file:///home/steffen/git/grammy-website/site/node_modules/cac/dist/index.mjs:610:34)
    at CAC.parse (file:///home/steffen/git/grammy-website/site/node_modules/cac/dist/index.mjs:537:12)
    at cli (file:///home/steffen/git/grammy-website/site/node_modules/@vuepress/cli/dist/index.js:602:11)
    at file:///home/steffen/git/grammy-website/site/node_modules/vuepress-vite/bin/vuepress.js:8:1
    at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:337:24)
    at async loadESM (node:internal/process/esm_loader:88:5)

# so here are my deps
$ cat package.json | jq '.devDependencies'
{
  "@vuepress/plugin-docsearch": "^2.0.0-beta.51",
  "deno-bin": ">=1.25.2",
  "static-sitemap-cli": "^2.1.2",
  "vuepress-vite": "^2.0.0-beta.51"
}

# and here is my system info:
$ uname -smv && node -v && npm -v
Linux vuepress/vuepress-next#1 SMP Debian 5.10.136-1 (2022-08-13) x86_64
v17.3.0
8.12.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions