// ![code ++]\n \u003Cexample /> {/* [!code ++] */}\n \u003Cexample /> /* [!code ++] */\n \u003Cexample /> {\n // [!code ++]\n }\n \u003Cexample /> \u003C!-- [!code ++] -->\n \u003C/message>\n )\n}\n```\n\n\n\n### Expected behavior\n\nIt doesnt really work. If the second usage is intended then it probably shouldn't end with `{}`\n\n### System Info\n\n```Text\nSystem:\n OS: Windows 10 10.0.19045\n CPU: (4) x64 Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz\n Memory: 247.00 MB / 3.87 GB\n Binaries:\n Node: 23.11.0 - C:\\Program Files\\nodejs\\node.EXE\n npm: 10.5.2 - ~\\AppData\\Roaming\\npm\\npm.CMD\n pnpm: 9.1.3 - ~\\AppData\\Local\\pnpm\\pnpm.EXE\n bun: 1.1.4 - ~\\.bun\\bin\\bun.EXE\n Browsers:\n Edge: Chromium (135.0.3179.54)\n npmPackages:\n vitepress: ^1.6.3 => 1.6.3\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.",[3062],{"name":3020,"color":3021},4776,"Can't use diff in Colored Diffs in JSX Code Blocks","2025-06-05T12:48:43Z","https://github.com/vuejs/vitepress/issues/4776",0.6717161,{"description":3069,"labels":3070,"number":3072,"owner":3023,"repository":3024,"state":3035,"title":3073,"updated_at":3074,"url":3075,"score":3076},"### Describe the bug\n\nI noticed that certain Markdown extensions for code blocks do not work as expected in VitePress when using the **templ** language, while they work properly for other languages like **js**. Specifically:\n\n- **Not Working Properly**:\n - Focus in Code Blocks\n - Colored Diffs in Code Blocks\n - Errors and Warnings in Code Blocks\n- **Working as Expected**:\n - Line Highlighting in Code Blocks\n\nThanks\n\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/vite-4gtyqrtf?file=docs%2Findex.md\n\nVisit the demo page by clicking the _MD Extensions Issue with Templ_ button on the homepage.\n\n\n### Expected behavior\n\nAll supported Markdown extensions for code blocks should render correctly, regardless of the specified language, as long as the language is supported by shiki. Since `templ` is a supported language, these extensions should work as expected, similar to how Line Highlighting currently works.\n\n### System Info\n\n```Text\nSystem:\n OS: macOS 15.2\n CPU: (8) arm64 Apple M3\n Memory: 434.31 MB / 24.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 20.18.1 - ~/.nvm/versions/node/v20.18.1/bin/node\n npm: 10.8.2 - ~/.nvm/versions/node/v20.18.1/bin/npm\n pnpm: 9.15.4 - ~/Library/pnpm/pnpm\n Browsers:\n Chrome: 131.0.6778.267\n Safari: 18.2\n npmPackages:\n vitepress: ^1.6.3 => 1.6.3\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.",[3071],{"name":3020,"color":3021},4515,"Markdown Extensions for Code Blocks Not Working Properly with ‘templ’ Language","2025-02-01T04:42:48Z","https://github.com/vuejs/vitepress/issues/4515",0.6733399,{"description":3078,"labels":3079,"number":3080,"owner":3023,"repository":3024,"state":3035,"title":3081,"updated_at":3082,"url":3083,"score":3084},"\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\nWhen creating a code block using line highlighting, it does not highlight the correct line. Instead it seems to highlight the line between the desired line and the previous line.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n\r\nCreate a new vitepress project. In any markdown page create a codeblock and specify the line to highlight. Check the output and the correct line will not be highlighted.\r\n\r\nExample:\r\n\r\n```md\r\n## Usage\r\n```html{3}\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003Ckro-button @click=\"delete\">Delete Cake\u003C/kro-button>\r\n \u003C/div>\r\n\u003C/template>\r\n\r\n\u003Cscript setup>\r\n import { useDialog } from '@black-kro/ui';\r\n\r\n const { createDialog } = useDialog();\r\n\r\n export const delete = () => {\r\n createDialog({\r\n title: 'Delete Cake?',\r\n message: 'Are you sure you would like to delete the cake?',\r\n })\r\n .then(() => {\r\n // Delete Cake.\r\n })\r\n .catch(() => {\r\n // Don't delete Cake.\r\n })\r\n }\r\n\u003C/script>\r\n```\r\n\r\nOutput:\r\n\r\n\r\n**Expected behavior**\r\nLine 3 should be highlighted.\r\n\r\n**System Info**\r\n- vitepress version: 0.5.0\r\n- vite version: 1.0.0-rc.3\r\n- Node version: 14.7.0\r\n- OS version: Windows 10\r\n",[],63,"Code block line highlighting not highlighting correct line","2023-01-21T16:22:16Z","https://github.com/vuejs/vitepress/issues/63",0.6846471,{"description":3086,"labels":3087,"number":3089,"owner":3023,"repository":3024,"state":3035,"title":3090,"updated_at":3091,"url":3092,"score":3093},"### Describe the bug\r\n\r\n\r\n\r\n\r\n\r\n\r\n### Reproduction\r\n\r\nyarn add vitepress\r\n\r\nedit package.json\r\n\r\n~~~\r\n \"scripts\": {\r\n \"docs:dev\": \"vitepress dev docs\",\r\n \"docs:build\": \"vitepress build docs\",\r\n \"docs:serve\": \"vitepress serve docs\"\r\n }\r\n~~~\r\n\r\nyarn docs:dev\r\n\r\n### Expected behavior\r\n\r\nnormal display\r\n\r\n### System Info\r\n\r\n```shell\r\nSystem:\r\n OS: Windows 10 10.0.17763\r\n CPU: (8) x64 Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz\r\n Memory: 3.25 GB / 7.93 GB\r\n Binaries:\r\n Node: 16.5.0 - C:\\Program Files\\nodejs\\node.EXE\r\n Yarn: 1.22.10 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 7.20.5 - C:\\Program Files\\nodejs\\npm.CMD\r\n Browsers:\r\n Chrome: 92.0.4515.107\r\n Edge: Spartan (44.17763.831.0)\r\n Internet Explorer: 11.0.17763.771\r\n npmPackages:\r\n vitepress: ^0.16.1 => 0.16.1\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/coc)\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":3020,"color":3021},362,"Strange symbols appear","2023-01-21T16:22:12Z","https://github.com/vuejs/vitepress/issues/362",0.6851506,{"description":3095,"labels":3096,"number":3097,"owner":3023,"repository":3024,"state":3035,"title":3098,"updated_at":3099,"url":3100,"score":3101},"### Describe the bug\n\nHeya, I'm experiencing a weird issue with Code Blocks which started by the beginning of this year after updating to a newer version from `1.3.2`.\nThe Highlighting used to work fine with an older version of vitepress but now it seems to be broken.\n\nResult right now:\n\n\n\nThe affected file is located here: https://github.com/AzonInc/Doorman/blob/master/docs/en/guide/firmware/additions.md\n\n### Reproduction\n\nCreate a Code Block using this MD:\n\n```yaml\nbinary_sensor: // [!code ++] // [!code focus]\n - platform: tc_bus // [!code ++] // [!code focus]\n name: \"Custom Command\" // [!code ++] // [!code focus]\n type: open_door // [!code ++] // [!code focus]\n address: 0 // [!code ++] // [!code focus]\n web_server: // [!code ++] // [!code focus]\n sorting_group_id: sorting_group_listeners // [!code ++] // [!code focus]\n```\n\n### Expected behavior\n\n// [!code ++] // [!code focus] shouldn't be visible and also not randomly applied.\n\n### System Info\n\n```Text\nSystem:\n OS: Windows 11 10.0.26120\n CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor\n Memory: 9.89 GB / 31.91 GB\n Binaries:\n Node: 21.1.0 - C:\\Program Files\\nodejs\\node.EXE\n Yarn: 1.22.17 - ~\\AppData\\Roaming\\npm\\yarn.CMD\n npm: 10.2.5 - C:\\Program Files\\nodejs\\npm.CMD\n pnpm: 6.11.0 - ~\\AppData\\Roaming\\npm\\pnpm.CMD\n Browsers:\n Chrome: 135.0.7049.116\n Edge: Chromium (136.0.3240.29)\n npmPackages:\n vitepress: ^2.0.0-alpha.5 => 2.0.0-alpha.5\n```\n\n### Additional context\n\nAm I doing anything wrong or is it really broken?\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.",[],4729,"Code Block Highlighting is broken","2025-05-03T13:08:14Z","https://github.com/vuejs/vitepress/issues/4729",0.68685734,{"description":3103,"labels":3104,"number":3108,"owner":3023,"repository":3024,"state":3035,"title":3109,"updated_at":3110,"url":3111,"score":3112},"### Describe the bug\n\nAssume we have below code:\r\n\r\n```md\r\n:::tip\r\n\r\n```html{1}\r\n\u003Cdiv class=\"grid-row grid-cols-2 justify-items-stretch\">\r\n \u003Cdiv>\u003C/div>\r\n \u003Cdiv>\u003C/div>\r\n\u003C/div>\r\n\r\n:::\r\n```\r\n\r\nWith above code we get code block rendered like below:\r\n\r\n\r\n\n\n### Reproduction\n\nAbove code (code block with highlighted lines in custom block)\n\n### Expected behavior\n\nIt should highlight full line\n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 5.15 Ubuntu 22.04 LTS 22.04 LTS (Jammy Jellyfish)\r\n CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor\r\n Memory: 9.52 GB / 15.57 GB\r\n Container: Yes\r\n Shell: 0.12.1 - /home/jd/.xonsh/.venv/bin/xonsh\r\n Binaries:\r\n Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node\r\n Yarn: 1.22.18 - ~/.nvm/versions/node/v16.14.2/bin/yarn\r\n npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm\r\n Browsers:\r\n Chrome: 101.0.4951.64\r\n npmPackages:\r\n vitepress: 1.0.0-alpha.4 => 1.0.0-alpha.4\n```\n\n\n### Additional context\n\nNone\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.",[3105],{"name":3106,"color":3107},"theme","0754FB",959,"Line highlighting style in custom block isn't working as expected","2023-01-21T14:30:27Z","https://github.com/vuejs/vitepress/issues/959",0.6877267,["Reactive",3114],{},["Set"],["ShallowReactive",3117],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fzrz7FAAyy9JPOdTM1aFlS5aMTi5v4TZgTSvD0RmA2oE":-1},"/vuejs/vitepress/3305"]