\n\n\u003Cimg width=\"376\" height=\"181\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2f33e227-2f78-4d2d-a90e-796eb5842643\" />\n\n### Reproduction\n\nUse the default tempalte \"no style\" and add a code block with line-numbers.\n\nTested version: \"vitepress\": \"^1.6.3\"\n\n### Expected behavior\n\nThe line numbers are next to the code.\n\n### System Info\n\n```Text\nSystem:\n OS: Windows 10 10.0.19045\n CPU: (16) x64 AMD Ryzen 7 5800X3D 8-Core Processor\n Memory: 11.37 GB / 31.92 GB\n Binaries:\n Node: 22.3.0 - C:\\Program Files\\nodejs\\node.EXE\n Yarn: 1.22.17 - ~\\AppData\\Roaming\\npm\\yarn.CMD\n npm: 9.8.1 - C:\\Program Files\\nodejs\\npm.CMD\n Browsers:\n Chrome: 138.0.7204.169\n Edge: Chromium (136.0.3240.92)\n Internet Explorer: 11.0.19041.5794\n npmPackages:\n vitepress: ^1.6.3 => 1.6.3\n```\n\n### Additional context\n\nTested on Chrome, Edge and Firefox - all have the same issue.\n\n### Validations\n\n- [x] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\n- [x] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [x] Read the [docs](https://vitepress.dev).\n- [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[3019],{"name":3020,"color":3021},"bug: pending triage","e99695",4865,"vuejs","vitepress","closed","markdown :line-numbers","2025-07-29T22:58:24Z","https://github.com/vuejs/vitepress/issues/4865",0.6278988,{"description":3031,"labels":3032,"number":3039,"owner":3023,"repository":3024,"state":3025,"title":3040,"updated_at":3041,"url":3042,"score":3043},"### Describe the bug\n\nWhen allowing word wrap in code blocks, the line numbers don't work correctly.\r\n\r\n\n\n### Reproduction\n\n1. set the code block to allow text wrap:\r\n\r\n```\r\n code {\r\n white-space: pre-wrap !important;\r\n }\r\n```\r\n\r\n2. set line numbers to true in config.ts\r\n```\r\nexport default defineConfig({\r\n markdown: { lineNumbers: true }\r\n})\r\n```\r\n\r\n4. write a long line of code, you can see something like the following:\r\n\r\n\u003Cimg width=\"726\" alt=\"image\" src=\"https://github.com/vuejs/vitepress/assets/3367820/12fbabb1-7adf-40a9-a740-d73b57aef4d1\">\r\n\n\n### Expected behavior\n\nThe line number should not increment until a new line met\n\n### System Info\n\n```sh\nSystem:\r\n OS: macOS 13.4.1\r\n CPU: (10) x64 Apple M1 Pro\r\n Memory: 32.79 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.12.0 - ~/.nvm/versions/node/v18.12.0/bin/node\r\n Yarn: 1.22.19 - ~/.yarn/bin/yarn\r\n npm: 8.19.2 - ~/.nvm/versions/node/v18.12.0/bin/npm\r\n Watchman: 2023.05.08.00 - /opt/homebrew/bin/watchman\r\n Browsers:\r\n Safari: 16.5.1\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.dev).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[3033,3036],{"name":3034,"color":3035},"theme","0754FB",{"name":3037,"color":3038},"has-workaround","1B4515",2567,"Code line numbers don't work well with text wrap","2023-07-10T00:05:11Z","https://github.com/vuejs/vitepress/issues/2567",0.6658313,{"description":3045,"labels":3046,"number":3053,"owner":3023,"repository":3024,"state":3025,"title":3054,"updated_at":3055,"url":3056,"score":3057},"### Describe the bug\r\n\r\nI have the markdown file name as: 02.2023_04_GB55030.md\r\n\r\nI have the config like this:\r\n```\r\n sidebar: {\r\n /////////////////////////////////////////////////////////////////////////////////////////\r\n '/Resource/': [\r\n {\r\n text: '新规提示', collapsed: false,\r\n items: [\r\n { text: '日常提醒', link: '/Resource/000.新规提示/00.日常提醒' },\r\n { text: '2023_03_GB55新规', link: '/Resource/000.新规提示/01.2023_03_GB55新规' },\r\n { text: '2023_04_GB55030', link: '/Resource/000.新规提示/02.2023_04_GB55030' },\r\n { text: '2023_06_GB55037', link: '/Resource/000.新规提示/03.2023_06_GB55037' },\r\n ],\r\n...\r\n\r\n```\r\nWorks fine in dev mode.\r\nHowever, the \"02.2023_04_GB55030\" link does not work in build mode. The link should end with `.html`, but it is missing and shows as 404.\r\n\r\nIf I change the code from\r\n```\r\n{ text: '2023_04_GB55030', link: '/Resource/000.新规提示/02.2023_04_GB55030' },\r\n```\r\nTo\r\n```\r\n{ text: '2023_04_GB55030新规', link: '/Resource/000.新规提示/02.2023_04_GB55030新规' },\r\n```\r\nand rename the file `02.2023_04_GB55030.md` to `02.2023_04_GB55030新规.md`\r\n\r\nThen the link will work fine, in both dev mode and build mode.\r\n\r\n\r\n### Reproduction\r\n\r\nas mentioned earlier\r\n\r\n### Expected behavior\r\n\r\nit should work in build mode.\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: Windows 10 10.0.22621\r\n CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz\r\n Memory: 48.30 GB / 63.73 GB\r\n Binaries:\r\n Node: 18.16.0 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.19 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 9.5.1 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Chromium (119.0.2151.97), ChromiumDev (121.0.2248.1)\r\n Internet Explorer: 11.0.22621.1\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.51 => 1.0.0-rc.31\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[3047,3050],{"name":3048,"color":3049},"need more info","bdbefc",{"name":3051,"color":3052},"stale","ededed",3289,"Markdown filenames ending in numbers don't seem to link correctly","2024-01-09T00:05:12Z","https://github.com/vuejs/vitepress/issues/3289",0.67041016,{"description":3059,"labels":3060,"number":3061,"owner":3023,"repository":3024,"state":3025,"title":3062,"updated_at":3063,"url":3064,"score":3065},"> vitepress v2.0.0-alpha.6\n\n我参考文档 和 config.ts 配置 markdown 。。\n\n添加 `[.vitepress/config.js]`,但是没有官网文档一样的展示效果 \n\n```\n> ```js [.vitepress/config.js]\n> export default {\n> // site-level options\n> title: 'VitePress',\n> description: 'Just playing around.',\n> \n> themeConfig: {\n> // theme-level options\n> }\n> }\n> ```\n> \n```",[],4806,"Markdown code file 配置问题","2025-06-22T04:07:34Z","https://github.com/vuejs/vitepress/issues/4806",0.6774869,{"description":3067,"labels":3068,"number":3069,"owner":3023,"repository":3024,"state":3025,"title":3070,"updated_at":3071,"url":3072,"score":3073},"### Describe the bug\n\nThe line highlighting features are broke now in the official vitepress documentation: \u003Chttps://vitepress.vuejs.org/guide/markdown.html#line-highlighting-in-code-blocks>\n\n### Reproduction\n\nOpen \u003Chttps://vitepress.vuejs.org/guide/markdown.html#line-highlighting-in-code-blocks> and discover the lines are not highlighted:\r\n\r\n\r\n\r\nCan also be reproduced locally with:\r\n\r\n```shell\r\n$ mkdir vtprs && cd vtprs\r\n$ yarn init\r\n$ yarn add --dev vitepress\r\n```\r\n\r\nWrite some code blocks with lines highlighted in `docs/index.md`, like\r\n\u003Cpre>\r\n```toml{2}\r\n[highlight]\r\nnot_highlighted = true\r\npublic = false\r\n```\r\n\u003C/pre>\r\n\r\nrun `yarn vitepress dev docs` and discover that second line is not highlighted as expected.\n\n### Expected behavior\n\nCode lines are highlighted with minimal setup.\n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 5.14 Arch Linux\r\n CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz\r\n Memory: 5.12 GB / 15.49 GB\r\n Container: Yes\r\n Shell: 5.8 - /usr/bin/zsh\r\n Binaries:\r\n Node: 14.17.4 - /sbin/node\r\n Yarn: 1.22.15 - /sbin/yarn\r\n npm: 7.24.2 - /sbin/npm\r\n Browsers:\r\n Chromium: 94.0.4606.71\r\n Firefox: 93.0\r\n npmPackages:\r\n vitepress: ^0.19.2 => 0.19.2\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/coc)\n- [X] Read the [docs](https://vitepress.vuejs.org/).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[],408,"Line Highlighting in Code Blocks breaks in v0.19.2","2023-01-21T16:20:27Z","https://github.com/vuejs/vitepress/issues/408",0.6808099,{"description":3075,"labels":3076,"number":3080,"owner":3023,"repository":3024,"state":3025,"title":3081,"updated_at":3082,"url":3083,"score":3084},"**Describe the bug**\r\nThe typing for `UserConfig` includes a `markdown` property which gives you access to the **mardown-it** options. This is an incredibly useful feature but sadly even though I put this into the `.vitepress/config.js` and it is indeed picked up and placed into the UserConfig that property is then ignored and not processed by the `createVitePressPlugin()`. \r\n\r\nI can create a PR for this if that of any help.\r\n\r\n**To Reproduce**\r\nadd a `.vitepress/config.js` which includes:\r\n\r\n```js\r\nmodules.exports = {\r\n // ...\r\n markdown: {\r\n config: md => { console.log(\"made it\") }\r\n }\r\n}\r\n```\r\n\r\n**Expected behavior**\r\nit should report \"made it\" when running `vitepress dev`\r\n\r\n**System Info**\r\n- vitepress version: 0.7.4\r\n- vite version: v1.0.0-rc.9\r\n- Node version: 12.19.0\r\n- OS version: macOS\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n",[3077],{"name":3078,"color":3079},"question","5D5FAE",133,"UserConfig allows `markdown` prop but it is then ignored","2023-01-21T16:24:14Z","https://github.com/vuejs/vitepress/issues/133",0.6812422,{"description":3086,"labels":3087,"number":3089,"owner":3023,"repository":3024,"state":3025,"title":3090,"updated_at":3091,"url":3092,"score":3093},"### Describe the bug\r\n\r\nMarkdown on the home page does not have the correct article style\r\n\r\n\r\n\r\n\r\n### Reproduction\r\n\r\n```md\r\n---\r\nlayout: home\r\n\r\nhero:\r\n name: VuePress\r\n text: Vite & Vue powered static site generator.\r\n tagline: Lorem ipsum...\r\n actions:\r\n - theme: brand\r\n text: Get Started\r\n link: /guide/what-is-vitepress\r\n - theme: alt\r\n text: View on GitHub\r\n link: https://github.com/vuejs/vitepress\r\n\r\nfeatures:\r\n - icon: ⚡️\r\n title: Vite, The DX that can't be beat\r\n details: Lorem ipsum...\r\n - icon: 🖖\r\n title: Power of Vue meets Markdown\r\n details: Lorem ipsum...\r\n - icon: 🛠️\r\n title: Simple and minimal, always\r\n details: Lorem ipsum...\r\n---\r\n\r\n# H1\r\nhello world\r\n## H2\r\nhello world\r\n### H3\r\nhello world\r\n\r\n```sh\r\nnpm i -g vitepress\r\n\\```\r\n```\r\n\r\n\r\n### Expected behavior\r\n\r\nHomePage markdown have the right Style Like docs\r\n\r\n\r\n\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 11.2.3\r\n CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz\r\n Memory: 716.61 MB / 16.00 GB\r\n Shell: 5.8 - /bin/zsh\r\n Binaries:\r\n Node: 14.19.1 - ~/.nvm/versions/node/v14.19.1/bin/node\r\n Yarn: 1.22.18 - ~/.nvm/versions/node/v14.19.1/bin/yarn\r\n npm: 6.14.16 - ~/.nvm/versions/node/v14.19.1/bin/npm\r\n Watchman: 2021.06.07.00 - /usr/local/bin/watchman\r\n Browsers:\r\n Chrome: 102.0.5005.115\r\n Edge: 102.0.1245.41\r\n Safari: 14.0.3\r\n npmPackages:\r\n vitepress: ^1.0.0-alpha.2 => 1.0.0-alpha.2\r\n```\r\n\r\n\r\n### Additional context\r\n\r\n\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.vuejs.org).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[3088],{"name":3034,"color":3035},800,"Markdown Style on the Homepage does not work properly","2024-02-25T00:05:03Z","https://github.com/vuejs/vitepress/issues/800",0.685714,{"description":3095,"labels":3096,"number":3100,"owner":3023,"repository":3024,"state":3025,"title":3101,"updated_at":3102,"url":3103,"score":3104},"### Describe the bug\n\nI found in `vue-html` code blocks + line number mode, there is no `line-numbers-mode` CSS class on the div wrapper, which leads to the layout bug like below:\r\n\r\n\r\n\r\n\r\n\n\n### Reproduction\n\n`index.md`:\r\n\r\n```\r\n\\```html\r\n\u003Cdiv id=\"event-handling\">\r\n \u003Cp>{{ message }}\u003C/p>\r\n \u003Cbutton v-on:click=\"reverseMessage\">Reverse Message\u003C/button>\r\n\u003C/div>\r\n\\```\r\n\r\n\\```vue-html\r\n\u003Cdiv id=\"event-handling\">\r\n \u003Cp>{{ message }}\u003C/p>\r\n \u003Cbutton v-on:click=\"reverseMessage\">Reverse Message\u003C/button>\r\n\u003C/div>\r\n\\```\r\n```\r\n\r\n`.vitepress/config.js`:\r\n\r\n```\r\nmodule.exports = () => ({\r\n markdown: {\r\n lineNumbers: true\r\n }\r\n})\r\n```\n\n### Expected behavior\n\nBy manually adding the CSS class in devtools, it goes normal.\r\n\r\n\r\n\r\n\r\n\n\n### System Info\n\n```shell\nSystem:\r\n OS: macOS 13.0\r\n CPU: (8) arm64 Apple M1\r\n Memory: 130.56 MB / 8.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node\r\n Yarn: 1.22.18 - ~/.yarn/bin/yarn\r\n npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm\r\n Browsers:\r\n Chrome: 103.0.5060.134\r\n Safari: 16.0\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.4 => 1.0.0-alpha.4\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.vuejs.org).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[3097],{"name":3098,"color":3099},"build","377ba8",1105,"The layout of vue-html code block in line number mode","2023-01-21T14:28:55Z","https://github.com/vuejs/vitepress/issues/1105",0.6861191,{"description":3106,"labels":3107,"number":3109,"owner":3023,"repository":3024,"state":3025,"title":3110,"updated_at":3111,"url":3112,"score":3113},"### Describe the bug\n\nhttps://stackblitz.com/edit/vite-j7cesz?file=docs/index.md is the repro. Its `index.md` compiles just fine with some other established markdown compilers -- I tried pandoc and it worked well.\r\n\r\nI would like to know what's wrong with my markdown code! It can be that I don't understand the VitePress markdown syntax well enough, or maybe I am lucky to find a bug in the compiler 😉 I would like to provide additional info amap.\n\n### Reproduction\n\nhttps://stackblitz.com/edit/vite-j7cesz?file=docs/index.md\n\n### Expected behavior\n\nCompiles just fine.\n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)\r\n CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H\r\n Memory: 5.91 GB / 7.61 GB\r\n Container: Yes\r\n Shell: 5.1.16 - /bin/bash\r\n Binaries:\r\n Node: 19.2.0 - /usr/bin/node\r\n npm: 8.19.3 - /usr/bin/npm\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.30 => 1.0.0-alpha.30\r\n```\n```\n\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\n- [X] Read the [docs](https://vitepress.vuejs.org).\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[3108],{"name":3020,"color":3021},1673,"VitePress does not compile a HTML-markdown mixed file saying that 'Element is missing end tag'","2023-01-21T14:17:06Z","https://github.com/vuejs/vitepress/issues/1673",0.6870425,{"description":3115,"labels":3116,"number":3118,"owner":3023,"repository":3024,"state":3025,"title":3119,"updated_at":3120,"url":3121,"score":3122},"### Describe the bug\r\n\r\nWhen following the documentation for extending the default theme; importing the theme and exported the extended theme results in the error `TS2708: Cannot use namespace 'DefaultTheme' as a value.`.\r\n\r\n\r\n### Reproduction\r\n\r\nIn a bare VitePress installation:\r\n\r\n`docs/.vitepress/theme/index.ts`\r\n```ts\r\nimport { DefaultTheme } from \"vitepress/theme\";\r\n\r\nexport default {\r\n extends: DefaultTheme\r\n}\r\n```\r\n\r\n`docs/.vitepress/theme/index.ts:4:11: TS2708: Cannot use namespace 'DefaultTheme' as a value.`\r\n\r\n### Expected behavior\r\n\r\nThe documented code would work.\r\n\r\n### System Info\r\n\r\n```sh\r\n System:\r\n OS: Linux 6.1 Manjaro Linux\r\n CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor\r\n Memory: 17.45 GB / 31.30 GB\r\n Container: Yes\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 16.20.0 - ~/.local/bin/node\r\n Yarn: 1.22.19 - ~/.local/bin/yarn\r\n npm: 9.6.5 - ~/.local/bin/npm\r\n Browsers:\r\n Chromium: 114.0.5735.133\r\n npmPackages:\r\n vitepress: ^1.0.0-beta.3 => 1.0.0-beta.3 \r\n```\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Validations\r\n\r\n- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).\r\n- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)\r\n- [X] Read the [docs](https://vitepress.dev).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[3117],{"name":3020,"color":3021},2532,"Cannot create theme with TypeScript: TS2708: Cannot use namespace 'DefaultTheme' as a value.","2023-06-28T00:04:53Z","https://github.com/vuejs/vitepress/issues/2532",0.6870482,["Reactive",3124],{},["Set"],["ShallowReactive",3127],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$flW4PRlYQMfyqqpXrqQtF7846X58OiNEFAygU4fuxFQ4":-1},"/vuejs/vitepress/1046"]