\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.",[3020],{"name":3021,"color":3022},"bug: pending triage","e99695",4865,"vuejs","vitepress","closed","markdown :line-numbers","2025-07-29T22:58:24Z","https://github.com/vuejs/vitepress/issues/4865",0.6869042,{"description":3032,"labels":3033,"number":3037,"owner":3024,"repository":3025,"state":3026,"title":3038,"updated_at":3039,"url":3040,"score":3041},"### Describe the bug\n\nAccording to [the configuration option](https://vitepress.vuejs.org/config/app-configs.html#markdown) of the documentation, this option is enabled:\r\n\r\n```ts\r\n// .vitepress/config.ts\r\nexport default defineConfig({\r\n // ...\r\n markdown: {\r\n lineNumbers: true,\r\n },\r\n // ...\r\n})\r\n```\r\n\r\nNot getting the expected result showing line numbers , by the way, the code snippets of the documentation also have no line numbers:\r\n\r\n\r\n\r\n\n\n### Reproduction\n\n```ts\r\n// .vitepress/config.ts\r\nexport default defineConfig({\r\n // ...\r\n markdown: {\r\n lineNumbers: true,\r\n },\r\n // ...\r\n})\r\n```\n\n### Expected behavior\n\nShow the code line numbers.\r\n\r\n\r\n\n\n### System Info\n\n```shell\nSystem:\r\n OS: Windows 10 10.0.19044\r\n CPU: (12) x64 Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz\r\n Memory: 8.46 GB / 15.91 GB\r\n Binaries:\r\n Node: 16.15.0 - D:\\Programs\\nodejs\\node.EXE\r\n Yarn: 1.22.18 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 8.11.0 - D:\\Programs\\nodejs\\npm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.62)\r\n Internet Explorer: 11.0.19041.1202\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.",[3034],{"name":3035,"color":3036},"need more info","bdbefc",1046,"markdown.lineNumbers doesn't work under default theme","2023-01-21T14:30:12Z","https://github.com/vuejs/vitepress/issues/1046",0.68994945,{"description":3043,"labels":3044,"number":3048,"owner":3024,"repository":3025,"state":3026,"title":3049,"updated_at":3050,"url":3051,"score":3052},"### Describe the bug\r\n\r\nhttps://github.com/vuejs/vitepress/blob/75ca9e4302c65e3bcc9518f7df928318380f6cf6/src/node/markdown/plugins/highlightLines.ts#L30\r\n\r\n`highlightLinePlugin` is used before `attrs`, and `token.info` is rewritten.\r\n\r\nvia https://github.com/vuejs/vitepress/pull/664#discussion_r902203459\r\n\r\n### Reproduction\r\n\r\n\u003Cimg width=\"177\" alt=\"image\" src=\"https://user-images.githubusercontent.com/8336744/174726207-1c068f94-f597-4d5e-9101-4709a08a60c3.png\">\r\n\r\n\u003Cimg width=\"299\" alt=\"image\" src=\"https://user-images.githubusercontent.com/8336744/174726233-83967c42-db47-4c12-8dbd-0c83a817c448.png\">\r\n\r\n\r\n### Expected behavior\r\n\r\nRender `data=\"asdf\"`\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: macOS 13.0\r\n CPU: (10) arm64 Apple M1 Max\r\n Memory: 13.84 GB / 64.00 GB\r\n Shell: 5.8.1 - /bin/zsh\r\n Binaries:\r\n Node: 16.15.1 - ~/Library/Caches/fnm_multishells/95455_1655742557079/bin/node\r\n Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/95455_1655742557079/bin/yarn\r\n npm: 8.12.1 - ~/Library/Caches/fnm_multishells/95455_1655742557079/bin/npm\r\n Browsers:\r\n Chrome: 102.0.5005.115\r\n Firefox: 101.0.1\r\n Safari: 16.0\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_No response_\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.",[3045],{"name":3046,"color":3047},"stale","ededed",826,"support adding attributes to code blocks","2023-08-11T00:04:28Z","https://github.com/vuejs/vitepress/issues/826",0.6945906,{"description":3054,"labels":3055,"number":3057,"owner":3024,"repository":3025,"state":3026,"title":3058,"updated_at":3059,"url":3060,"score":3061},"### Describe the bug\r\n\r\nThe `\u003CContent />` component wraps the code with a \"position: relative\" styled div. \r\n\r\n\u003Cimg width=\"656\" alt=\"Screenshot 2023-07-30 at 9 43 37 PM\" src=\"https://github.com/vuejs/vitepress/assets/90354202/a7f83520-edc3-415d-b851-2487693e1ba9\">\r\n\r\n\r\n### Reproduction\r\n\r\nThe \u003CContent /> component wraps the code with a \"position: relative\" styled div. \r\n\r\n### Expected behavior\r\n\r\nThere is no documentation on how to disable that from happening and it shouldn't do that in the first place anyway. \r\n\r\n### System Info\r\n\r\n```sh\r\nv1.0.0-beta.7\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.",[3056],{"name":3021,"color":3022},2712,"The \u003CContent /> component wraps the code with a \"position: relative\" styled div.","2023-08-11T00:04:38Z","https://github.com/vuejs/vitepress/issues/2712",0.6988725,{"description":3063,"labels":3064,"number":3068,"owner":3024,"repository":3025,"state":3026,"title":3069,"updated_at":3070,"url":3071,"score":3072},"### Describe the bug\r\n\r\nSome of the code markdown extensions do not work when the language is `vue`.\r\n\r\nIn particular, `[!code ++]`, `[!code --]`, `[!code warning]`, `[!code error]` and `[!code focus]` just show the comments at the end of the line.\r\n\r\nChanging the language to something else fixes this, e.g. `htmx` or `ts`.\r\n\r\nThis only seems to happen in the template tags of a `vue` code block. The highlighting works absolutely fine in the script part. Please see reproduction for code examples, I can't figure out how to escape the triple backtick code blocks here! ☹️ \r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/vite-arupmh?file=docs%2Fexample.md\r\n\r\n### Expected behavior\r\n\r\nThe markdown extensions should work correctly and highlight the lines as per [the docs](https://vitepress.dev/guide/markdown#focus-in-code-blocks).\r\n\r\n### System Info\r\n\r\n```Text\r\nSystem:\r\n OS: macOS 14.1.2\r\n CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 488.47 MB / 16.00 GB\r\n Shell: 5.9 - /bin/zsh\r\nBinaries:\r\n Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node\r\n Yarn: 1.22.10 - /usr/local/bin/yarn\r\n npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm\r\nBrowsers:\r\n Chrome: 120.0.6099.234\r\n Firefox: 112.0.2\r\n Firefox Developer Edition: 107.0\r\n Safari: 17.1.2\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.",[3065],{"name":3066,"color":3067},"upstream","BF29ED",3503,"Markdown code extensions don't work in some situations","2025-02-01T04:42:47Z","https://github.com/vuejs/vitepress/issues/3503",0.6994994,{"description":3074,"labels":3075,"number":1662,"owner":3024,"repository":3025,"state":3026,"title":3076,"updated_at":3077,"url":3078,"score":3079},"# vuepress special markdown\r\n\r\n## topic of contents\r\n::: details code\r\n```\r\n[[toc]]\r\n```\r\n:::\r\n[[toc]]\r\n\r\n## emoji\r\n::: details code\r\n```\r\n:tada: :100:\r\n```\r\n:::\r\n:tada: :100:\r\n\r\n## containers\r\n\r\n::: tip\r\nThis is a tip\r\n:::\r\n\r\n\r\n::: warning\r\nThis is a warning\r\n:::\r\n\r\n::: danger\r\nThis is a dangerous warning\r\n:::\r\n\r\n::: details\r\nThis is a details block, which does not work in IE / Edge\r\n:::\r\n\r\n::: danger STOP\r\nDanger zone, do not proceed\r\n:::\r\n\r\n::: details codes\r\n```js{2}\r\nconsole.log(\"Hello, VuePress!\")\r\nconsole.log(\"Hello, CICD!\")\r\n```\r\n:::\r\n\r\n## tables\r\n::: details codes\r\n```\r\n| Tables | Are | Cool |\r\n| ------------- |:-------------:| -----:|\r\n| col 3 is | right-aligned | $1600 |\r\n| col 2 is | centered | $12 |\r\n| zebra stripes | are neat | $1 |\r\n```\r\n:::\r\n| Tables | Are | Cool |\r\n| ------------- |:-------------:| -----:|\r\n| col 3 is | right-aligned | $1600 |\r\n| col 2 is | centered | $12 |\r\n| zebra stripes | are neat | $1 |",[],"does not render some styles that is handy","2023-01-21T16:25:42Z","https://github.com/vuejs/vitepress/issues/11",0.7042683,{"description":3081,"labels":3082,"number":3089,"owner":3024,"repository":3025,"state":3026,"title":3090,"updated_at":3091,"url":3092,"score":3093},"### 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.",[3083,3086],{"name":3084,"color":3085},"theme","0754FB",{"name":3087,"color":3088},"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.7046067,{"description":3095,"labels":3096,"number":3098,"owner":3024,"repository":3025,"state":3026,"title":3099,"updated_at":3100,"url":3101,"score":3102},"### Describe the bug\n\nIn mobile, there is a gap on the leftmost side of the code block in [this address](https://vitepress.vuejs.org/guide/deploying.html), which is not consistent with the style of the code block on other pages.\r\n\r\n\r\n\n\n### Reproduction\n\nhttps://vitepress.vuejs.org/guide/deploying.html\n\n### Expected behavior\n\nConsistent with the rest of the page code block style.\n\n### System Info\n\n```shell\nSystem:\r\n OS: Windows 10 10.0.19044\r\n CPU: (8) x64 Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz\r\n Memory: 3.59 GB / 15.9 GB\r\nBinaries:\r\n Node: 16.10.0 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.17 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 7.24.0 - C:\\Program Files\\nodejs\\npm.CMD\r\nBrowsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.62)\r\n Internet Explorer: 11.0.19041.1566\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":3021,"color":3022},1102,"Inconsistency of code block style in mobile","2023-01-21T14:28:56Z","https://github.com/vuejs/vitepress/issues/1102",0.7061257,{"description":3104,"labels":3105,"number":3107,"owner":3024,"repository":3025,"state":3026,"title":3108,"updated_at":3109,"url":3110,"score":3111},"\u003C!--\r\nNOTE:\r\nVitePress is still WIP, and it is not compatible with VuePress.\r\nPlease do not open issue about default theme missing features or something doesn't work like VuePress.\r\n-->\r\n\r\n**Describe the bug**\r\n\r\nindex.md with\r\n\r\n```\r\n\u003Cfoo-bar>\r\nxxx\r\n\u003C/foo-bar>\r\n```\r\nwill throw error\r\n\r\n``` bash\r\n[vite] SFC template compilation error: \r\ndocs/index.md:4:1\r\nElement is missing end tag.\r\n1 | \r\n2 | \u003Ctemplate>\u003Cdiv>\u003Ch1 id=\"test\">\u003Ca class=\"header-anchor\" href=\"#test\" aria-hidden=\"true\">#\u003C/a> test\u003C/h1>\r\n3 | \u003Cfoo-bar>\r\n | ^\r\n4 | \u003Cp>xxx\r\n5 | \u003C/foo-bar>\u003C/p>\r\n\r\ndocs/index.md:5:11\r\nInvalid end tag.\r\n3 | \u003Cfoo-bar>\r\n4 | \u003Cp>xxx\r\n5 | \u003C/foo-bar>\u003C/p>\r\n | ^\r\n6 | \u003C/div>\u003C/template>\r\n```\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n\r\nclone [my repo](https://github.com/xxholly32/vitepress-playground)\r\n\r\nrun `npm i && npm run docs`\r\n\r\n**Expected behavior**\r\nA clear and concise description of what you expected to happen.\r\n\r\nno error or warning and transform will be correct\r\n\r\n**System Info**\r\n- vitepress version:0.6.0\r\n- vite version:1.0.0-rc.3\r\n- Node version:v12.16\r\n- OS version:10.15\r\n",[3106],{"name":3021,"color":3022},95,"Multiline vue-components transform error ","2023-01-21T16:24:24Z","https://github.com/vuejs/vitepress/issues/95",0.7065559,{"description":3113,"labels":3114,"number":3116,"owner":3024,"repository":3025,"state":3026,"title":3117,"updated_at":3118,"url":3119,"score":3120},"### Describe the bug\n\n1. 组件中 style scoped 使用了 bootstrap,某些 class 样式出不来,比如下面 `rounded`;\r\n\r\n\r\n2. 如果在 vue 组件的 script 导入 bootstrap,则会影响默认主题的样式,比如下面标题\r\n\r\n\r\n3. 不管是使用 slots 还是使用全局注册组件,都是一样的问题;\n\n### Reproduction\n\n默认主题结合 bootstrap 很容易重现。\n\n### Expected behavior\n\n我希望在 vitepress 的组件中使用 bootstrap 快速开发。\n\n### System Info\n\n```sh\nSystem:\r\n OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)\r\n CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\r\n Memory: 4.30 GB / 7.72 GB\r\n Container: Yes\r\n Shell: 5.1.16 - /bin/bash\r\n Binaries:\r\n Node: 19.5.0 - ~/.nvm/versions/node/v19.5.0/bin/node\r\n npm: 9.6.4 - ~/.nvm/versions/node/v19.5.0/bin/npm\r\n pnpm: 8.6.9 - ~/.local/share/pnpm/pnpm\r\n npmPackages:\r\n vitepress: 1.0.0-beta.6 => 1.0.0-beta.6\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.",[3115],{"name":3084,"color":3085},2683,"默认主题添加组件使用 bootstrap 样式没有预期","2023-08-18T00:04:15Z","https://github.com/vuejs/vitepress/issues/2683",0.7071991,["Reactive",3122],{},["Set"],["ShallowReactive",3125],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f0zMw5XoLK5QjtvskgtP--hN6HsvZIblCbUPNW0viloc":-1},"/vuejs/vitepress/1105"]