/, true],\r\n // custom elements with hyphens\r\n [/^\u003C\\w+\\-/, />/, true],\r\n]\r\n```\r\n\r\nThe intent here is to mark the opening and closing of scope for a component but as you can see from the RegEx it is only looking for inline components not block components!\r\n\r\nFor example, the component `p-table` has several named slots which help it to render the way the user intends:\r\n\r\n```html\r\n\u003Cp-table>\r\n \r\n \u003Ctemplate #name=\"{ row }\">\r\n {{ row.name }}\r\n \u003C/template>\r\n\r\n \u003Ctemplate #age=\"{ row }\">\r\n {{ row.age }}\r\n \u003C/template>\r\n\r\n\u003C/p-table>\r\n```\r\n\r\nPut this into the template section of a Vue CLI app and it works just fine. Put it into Vuepress or Vitepress and watch the cloud of smoke start to rise as it fumbles around; particularly failing on the `#` symbols used as shorthand for named slots. This is particularly troublesome for a documentation site that is trying to document a set of VueJS components! There should be a way to ensure that this VueJS component's interior scope is left untouched by **Markdown-it** ... at least when that's what you want. \r\n\r\nThere is a second use-case that I would expect Vitepress to just handle and that is _kind of_ what it's doing today but in a hit and miss fashion currently. Let's say that I just have a default slot in my component and therefore I want my component to be seen by the Markdown engine as being an \"inline\" component and process the interior as markdown. Great, then the following should work:\r\n\r\n```md\r\n\u003Csuper-sexy>\r\n# some heading\r\n## some sub heading\r\n\u003C/super-sexy>\r\n```\r\n\r\nThis would just provide some HTML wrapper elements that would in this case make this very dull markdown sexy.\r\n\r\nFinally there is a third use-case that really should be considered required too ... this is the hybrid but it will allow for all sorts of simple but useful documentation components. The use-case presents as a component that exposes named slots -- and therefore is seen by Markdown as a block component -- but these named slots _are_ processed by markdown. An obvious example might be a `\u003Ctwo-columns>` component which provides a `left` and `right` slot and allows authors to more readily leverage their horizontal space.\r\n\r\nImagine the following:\r\n\r\n```html\r\n\u003Ctwo-columns>\r\n\r\n \u003Ctemplate #left>\r\n I'm a lumberjack and I'm ok\r\n \u003C/template>\r\n \u003Ctemplate #right>\r\n I sleep all night and I work all day\r\n \u003C/template>\r\n\r\n\u003C/two-columns>\r\n```\r\n \r\nThis will fail miserably today but it _could_ be grand!\r\n\r\n** Proposed Solution **\r\n\r\nRework the `src/node/markdown/plugins/components.ts` file in Vitepress (same change can be applied to Vuepress) to:\r\n\r\n- use more sophisticated RegEx patterns to actually capture BLOCK content not just inline components\r\n- support two modes of processing for BLOCK VueJS components: \r\n\r\n 1. Isolated - the interior scope is _not_ processed as markdown and all registered VueJS components can operate exactly like they would normally do\r\n 2. Parsed - the interior scope is processed as markdown; this will work well for default slots where the interior content is Markdown content\r\n\r\n- the Isolated mode should be seen as the _default_ as it is more powerful and allows components that work outside the context of Vitepress/Vuepress to just work here as well\r\n- the parsed mode may be popular for components designed strictly for Vitepress and Vuepress and it could be opted into in the HTML template like so:\r\n\r\n ```html\r\n \u003Cmy-crazy-idea parsed>There I was, _there I was_, in the Congo\u003C/my-crazy-idea>\r\n ```\r\n\r\nThis solution so far could pretty easily support the first two use cases which is a big step forward. The third use-case would certainly be nice but would need a bit more thought. I could imagine something as simple as adding the `md` prop to the parent component being used as a means to pass in the Markdownit object into the top-level component so it could chain the rendering into the various named slots:\r\n\r\n ```html\r\n \u003Cmy-crazy-idea md>\r\n \u003Ctemplate #left>\r\n There I was, _there I was_, \r\n \u003Ctemplate #right>\r\n I sleep all night and I work all day\r\n \u003C/template>\r\n \u003C/my-crazy-idea>\r\n ```\r\n\r\nIn all likelihood this last option should be done as an optional second step.\r\n",[],135,"vuejs","vitepress","closed","Proper processing of Vue Component slot content","2023-01-21T14:28:50Z","https://github.com/vuejs/vitepress/issues/135",0.7001435,{"description":3029,"labels":3030,"number":3034,"owner":3021,"repository":3022,"state":3023,"title":3035,"updated_at":3036,"url":3037,"score":3038},"### 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.",[3031],{"name":3032,"color":3033},"bug: pending triage","e99695",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.7047635,{"description":3040,"labels":3041,"number":3045,"owner":3021,"repository":3022,"state":3023,"title":3046,"updated_at":3047,"url":3048,"score":3049},"### 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.",[3042],{"name":3043,"color":3044},"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.706232,{"description":3051,"labels":3052,"number":3053,"owner":3021,"repository":3022,"state":3023,"title":3054,"updated_at":3055,"url":3056,"score":3057},"### Is your feature request related to a problem? Please describe.\n\nI have a lot of md files (10K+) that want to serve with vitepress, which contains something made vitepress unhappy (e.g. un closed tags, or `{{ xxx }}`), all I want to do is simply serve them as html pages, without any vue-parsing stuff, but vitepress keep complain about the those things while building. There're too many files for me to fix them one by one, it's nearly impossible.\n\n### Describe the solution you'd like\n\nprovide an option to completely op-out the vue related processing stuff, just parse and display markdowns\n\n### Describe alternatives you've considered\n\nother alternatives are also welcome as long as it solved this kind of problem.\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.dev).\n- [X] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],3452,"Can we provide an option to completely op-out the vue related processing stuff?","2024-01-25T00:04:47Z","https://github.com/vuejs/vitepress/issues/3452",0.7088833,{"description":3059,"labels":3060,"number":3061,"owner":3021,"repository":3022,"state":3023,"title":3062,"updated_at":3063,"url":3064,"score":3065},"### Is your feature request related to a problem? Please describe.\n\nI'm using VitePress to document our coding standards and our design system. I want to show examples of the code we would use (HTML and Vue components) *and* how that code would render.\r\n\r\nI can import and use Vue components in the markdown (and HTML) without issue. But to show both the \"live\" and \"source\" views of that code, I have to copy my live code into a separate markdown code block, which means now I have *two* blocks of code to manage and synchronize for each example.\n\n### Describe the solution you'd like\n\nI'd like a new directive for \"```\" code blocks that, when viewed in VitePress, shows up as a tabbed interface with two tabs: (1) the rendered version of that code (using the normal rendering done by VitePress, supporting Vue and HTML), and (2) the normal way the code block would be otherwise rendered.\r\n\r\nI *believe* this would simply require detecting this directive, duplicating the code within the block as non-fenced code, and wrapping the pair in a simple tabbed Vue component.\r\n\r\nObviously for more complex examples, the VitePress version of the live code will differ from what needs to be shown to the user, so that is a challenge (the Vue docs themselves have this challenge). But for simple examples of using Vue components and HTML with no additional script involved, it would really help.\r\n\r\nMy suggestion would be something like \"```html:live\", where the \":live\" bit either comes before or after any row number highlights (I don't think it would matter).\n\n### Describe alternatives you've considered\n\nCopying and pasting between markdown code blocks to markdown live code, keeping them synchronized as the code is updated.\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] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/main/.github/contributing.md).\n- [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.",[],554,"\"Live\" Code Blocks","2023-01-21T14:20:27Z","https://github.com/vuejs/vitepress/issues/554",0.709471,{"description":3067,"labels":3068,"number":3072,"owner":3021,"repository":3022,"state":3023,"title":3073,"updated_at":3074,"url":3075,"score":3076},"### Describe the bug\n\nWhen using vitepress to package and build, it is found that \"build error:\r\n\r\nError: Whitespace was expected.\"\n\n### Reproduction\n\n1. Create a new md file\r\n2. The written content contains\u003Cscript>content\r\n3. Build\n\n### Expected behavior\n\nSuccessful Build Project\n\n### System Info\n\n```shell\nSystem:\r\n OS: Linux 3.10 CentOS Linux 7 (Core)\r\n CPU: (1) x64 AMD EPYC 7K62 48-Core Processor\r\n Memory: 328.55 MB / 990.87 MB\r\n Container: Yes\r\n Shell: 4.2.46 - /bin/bash\r\n Binaries:\r\n Node: 16.16.0 - /usr/bin/node\r\n Yarn: 1.22.19 - /usr/bin/yarn\r\n npm: 8.14.0 - /usr/bin/npm\r\n npmPackages:\r\n vitepress: ^0.7.2 => 0.7.2\n```\n\n\n### Additional context\n\nbuilding client bundle...\r\nLanguage does not exist: npm\r\nLanguage does not exist: code\r\nLanguage does not exist: \u003Cscript\r\nbuild error:\r\n Error: Whitespace was expected.\r\n at error (/www/wwwroot/server/blog/node_modules/rollup/dist/shared/rollup.js:5252:30)\r\n at throwPluginError (/www/wwwroot/server/blog/node_modules/rollup/dist/shared/rollup.js:17916:12)\r\n at Object.error (/www/wwwroot/server/blog/node_modules/rollup/dist/shared/rollup.js:18523:24)\r\n at Object.error (/www/wwwroot/server/blog/node_modules/rollup/dist/shared/rollup.js:18085:38)\r\n at /www/wwwroot/server/blog/node_modules/rollup-plugin-vue/dist/index.js:211:52\r\n at Array.forEach (\u003Canonymous>)\r\n at Object.transform (/www/wwwroot/server/blog/node_modules/rollup-plugin-vue/dist/index.js:211:28)\r\n at /www/wwwroot/server/blog/node_modules/rollup/dist/shared/rollup.js:18724:25 {\r\n id: '/www/wwwroot/server/blog/docs/9777e974-d9f8-468f-9859-eb078bcf5b8d.md',\r\n plugin: 'vue',\r\n pluginCode: '15',\r\n frame: '',\r\n parserError: SyntaxError: Whitespace was expected.\r\n at createCompilerError (/www/wwwroot/server/blog/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:16:19)\r\n at emitError (/www/wwwroot/server/blog/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:1187:29)\r\n at parseAttributes (/www/wwwroot/server/blog/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:941:13)\r\n at parseTag (/www/wwwroot/server/blog/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:857:17)\r\n at parseElement (/www/wwwroot/server/blog/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:807:21)\r\n at parseChildren (/www/wwwroot/server/blog/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:650:28)\r\n at parseElement (/www/wwwroot/server/blog/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:816:22)\r\n at parseChildren (/www/wwwroot/server/blog/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:650:28)\r\n at parseElement (/www/wwwroot/server/blog/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:816:22)\r\n at parseChildren (/www/wwwroot/server/blog/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:650:28) {\r\n code: 15,\r\n loc: { start: [Object], end: [Object], source: '' }\r\n },\r\n loc: {\r\n file: '/www/wwwroot/server/blog/docs/9777e974-d9f8-468f-9859-eb078bcf5b8d.md',\r\n line: 110,\r\n column: 35\r\n },\r\n hook: 'transform',\r\n code: 'PLUGIN_ERROR',\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.",[3069],{"name":3070,"color":3071},"need more info","bdbefc",1526,"When using vitepress to package and build, it is found that \"build error: Error: Whitespace was expected.\"","2023-01-21T14:23:03Z","https://github.com/vuejs/vitepress/issues/1526",0.7119691,{"description":3078,"labels":3079,"number":3080,"owner":3021,"repository":3022,"state":3023,"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.71548355,{"description":3086,"labels":3087,"number":3088,"owner":3021,"repository":3022,"state":3023,"title":3089,"updated_at":3090,"url":3091,"score":3092},"### Is your feature request related to a problem? Please describe.\r\n\r\nIn order to create good documentation of a standalone Vue component, we want to show many usage examples.\r\n\r\nEvery usage example is a Vue file.\r\n\r\nWe need to be able to import a Vue file in Vitepress, show its source code as CodeBlock.\r\n- Not just a single code block like you can already do in Vitepress, but a Codeblock with tabs on top that split up the source code in `template` / `script` / `style` tabs.\r\n- Also, another tab should say `example` rendering the actual imported Vue component.\r\n\r\n\r\n### Describe the solution you'd like\r\n\r\nThe ideal syntax would look something like this:\r\n```html\r\n\u003CCodeBlockComponent filename=\"blitz-form/Basics - Basic Example\" />\r\n```\r\nAnd here is a video of how it would render in Vitepress:\r\n\r\nhttps://user-images.githubusercontent.com/3253920/140631280-adae2d0b-47d9-4172-b105-f6f4ee5f41f4.mp4\r\n\r\n(I have styled this a little bit to fit my docs style, but of course the styling can be way more bare-bones and we can overwrite the styling with CSS.)\r\n\r\n\r\n\r\n### Describe alternatives you've considered\r\n\r\nI actually already finished this feature for VitePress. I created my custom solution.\r\n\r\nUnder the hood I'm using a combination of these import methods:\r\n```js\r\nimport(`../docs/${filename}.vue`) // for the component\r\n// and\r\nimport(`../docs/${filename}.vue?raw`) // for the source code\r\n```\r\n\r\n~~Everything works when I'm using the VitePress development server. However, as soon as I build and deploy my code to a hosting service, all the Code Blocks break.~~\r\n\r\n~~I searched a lot for solutions, but this is not my strongest point. This past week I tried a bunch of things but still haven't found out how to make it work.~~\r\n\r\n(See next comment, where I explain how I fixed it)\r\n\r\n### Additional context\r\n\r\nI would love to request for an official solution for what I'm trying to do.\r\n\r\nI believe a lot of developers who want to share a Vue component and whip up a quick VitePress documentation about their component, would love this feature.\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] Read the [Contributing Guidelines](https://github.com/vuejs/vitepress/blob/master/.github/contributing.md).\r\n- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.",[],437,"FR: Code Block that renders Vue file component and source code","2023-01-29T00:04:23Z","https://github.com/vuejs/vitepress/issues/437",0.7179392,{"description":3094,"labels":3095,"number":3097,"owner":3021,"repository":3022,"state":3023,"title":3098,"updated_at":3099,"url":3100,"score":3101},"### Describe the bug\n\nI want to use the vue component in vitepress. I have read the documentation on the official website, but when I do it, I encounter an error like this.\r\n```bash\r\n[plugin:vite:vue] Tags with side effect (\u003Cscript> and \u003Cstyle>) are ignored in client component templates.\r\n```\r\n\r\nI don't understand what I'm encountering, I just want to achieve the effect here in this vue document\r\n\r\n> https://cn.vuejs.org/guide/reusability/composables.html#vs-react-hooks\r\n\r\n\r\n\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/vite-dn63jg?file=docs%2Fhooks%2FuseMouse.js,docs%2Fexample.md\n\n### Expected behavior\n\nThe documentation on the official website makes me understand the difficulty or the need for a better demo?\n\n### System Info\n\n```Text\nSystem:\r\n OS: Windows 11 10.0.22631\r\n CPU: (20) x64 13th Gen Intel(R) CoreT i7-13800H\r\n Memory: 17.07 GB / 31.74 GB\r\n Binaries:\r\n Node: 20.11.0 - ~\\AppData\\Local\\pnpm\\node.EXE\r\n npm: 10.2.4 - ~\\AppData\\Local\\pnpm\\npm.CMD\r\n pnpm: 8.14.1 - ~\\AppData\\Local\\pnpm\\pnpm.EXE\r\n Browsers:\r\n Edge: Chromium (120.0.2210.133)\r\n Internet Explorer: 11.0.22621.1\r\n npmPackages:\r\n vitepress: 1.0.0-rc.39 => 1.0.0-rc.39\n```\n\n\n### Additional context\n\nPlease tell me the correct way to write it, thank you\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.",[3096],{"name":3032,"color":3033},3485,"Using vue to report errors in markdown","2024-01-29T00:04:28Z","https://github.com/vuejs/vitepress/issues/3485",0.71915615,{"description":3103,"labels":3104,"number":3106,"owner":3021,"repository":3022,"state":3023,"title":3107,"updated_at":3108,"url":3109,"score":3110},"### Describe the bug\n\nThis works fine:\n\n```markdown\n# A simple test\n\n\u003Cdiv>\n \u003Cdiv>\n\n## Here is some simple markdown\n\n \u003C/div>\n\u003C/div>\n```\n\nBut the following examples all break the parser in the same way.\n\nUsing 4 spaces or more (e.g. 2 levels of nesting):\n\n```markdown\n# A simple test\n\n\u003Cdiv>\n \u003Cdiv>\n \u003Cdiv>\n\n## Here is some simple markdown\n\n \u003C/div>\n \u003C/div>\n\u003C/div>\n```\n\nUsing tabs:\n\n```markdown\n# A simple test\n\n\u003Cdiv>\n\t\u003Cdiv>\n\n## Here is some simple markdown\n\n\t\u003C/div>\n\u003C/div>\n```\n\n### Reproduction\n\nhttps://stackblitz.com/edit/vite-n9zg13ts?file=docs%2Findex.md\n\n### Expected behavior\n\nWhatever indentation is used for the last element before the embedded markdown, should work on the first element after the embedded markdown. This should work both for spaces and tabs, and for any number of characters and any level of nesting.\n\n### System Info\n\n```Text\nSystem:\n OS: macOS 15.5\n CPU: (12) arm64 Apple M2 Max\n Memory: 232.30 MB / 64.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n Node: 22.6.0 - ~/.nvm/versions/node/v22.6.0/bin/node\n npm: 10.8.2 - ~/.nvm/versions/node/v22.6.0/bin/npm\n Browsers:\n Chrome: 138.0.7204.101\n Safari: 18.5\n npmPackages:\n vitepress: ~2.0.0-alpha.7 => 2.0.0-alpha.7\n```\n\n### Additional context\n\nError in browser:\n\n\u003Cimg width=\"1291\" height=\"567\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/17834ed3-31f1-4c1f-b8e8-3e05aa62fc51\" />\n\nThe issue can also be seen in VS Code, where the closing element will lose its syntax coloring:\n\n\u003Cimg width=\"415\" height=\"258\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/00d3e974-6626-4a47-9a29-0d42069b3435\" />\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.",[3105],{"name":3032,"color":3033},4836,"Mixing markdown inside markup breaks parsing if closing element is indented by 4 spaces or 1 tab (or more)","2025-07-13T09:28:05Z","https://github.com/vuejs/vitepress/issues/4836",0.72157466,["Reactive",3112],{},["Set"],["ShallowReactive",3115],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f9UR9vZBH25LtckgHRql8tfo-TWCO91JPF-vJgb-x4JU":-1},"/vuejs/vitepress/3958"]