diff --git a/docs/blog/1.示例/markdown基础.md b/docs/blog/1.示例/markdown基础.md
index f2af23df..5c7e15dc 100644
--- a/docs/blog/1.示例/markdown基础.md
+++ b/docs/blog/1.示例/markdown基础.md
@@ -401,7 +401,7 @@ end tell
在代码块里面, `&` 、 `<` 和 `>` 会自动转成 HTML 实体,这样的方式让你非常容易使用 Markdown 插入范例用的 HTML 原始码,只需要复制粘贴,再加上缩进就可以了,剩下的 Markdown 都会帮你处理,例如:
````md
-```
+```html
diff --git a/docs/blog/1.示例/markdown扩展.md b/docs/blog/1.示例/markdown扩展.md
index e562b441..746c7626 100644
--- a/docs/blog/1.示例/markdown扩展.md
+++ b/docs/blog/1.示例/markdown扩展.md
@@ -239,7 +239,7 @@ Shiki 支持多种编程语言。需要做的就是将有效的语言别名附
**输入:**
-````
+````md
```js
export default {
name: 'MyComponent',
@@ -248,7 +248,7 @@ export default {
```
````
-````
+````md
```html
-
@@ -281,7 +281,7 @@ export default {
**输入:**
-````
+````md
```js{4}
export default {
data () {
@@ -313,7 +313,7 @@ export default {
**输入:**
-````
+````md
```js{1,4,6-8}
export default { // Highlighted
data () {
@@ -349,10 +349,10 @@ export default { // Highlighted
**输入:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
msg: 'Highlighted!' // [\!code highlight]
}
@@ -381,10 +381,10 @@ export default {
**输入:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
msg: 'Focused!' // [\!code focus]
}
@@ -411,10 +411,10 @@ export default {
**输入:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
remove: 'Removed', // [\!code --]
add: 'Added' // [\!code ++]
@@ -443,10 +443,10 @@ export default {
**输入:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
error: 'Error', // [\!code error]
warning: 'Warning' // [\!code warning]
@@ -473,7 +473,7 @@ export default {
**输入:**
-````
+````md
```ts
export function foo() { // [\!code word:Hello]
const msg = 'Hello World'
@@ -495,7 +495,7 @@ export function foo() { // [!code word:Hello]
**输入:**
-````
+````md
```ts
// [\!code word:options:2]
const options = { foo: 'bar' }
@@ -613,7 +613,7 @@ export default config
**输入:**
-````
+````md
When $a \ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are
$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$
@@ -711,7 +711,7 @@ vuepress-theme-plume 是一个 ==简洁美观== 的 主题
这将为图片添加 一个 名为 `full-width` 的 class 属性,以及一个 `width` 属性,值为 `100%`。
```md
-{.full-width width="100%"}
+{.full-width width="100%"}
```
同时也支持其他属性:
diff --git a/docs/blog/4.教程/frontmatter.md b/docs/blog/4.教程/frontmatter.md
index 8f15c1ad..3640537e 100644
--- a/docs/blog/4.教程/frontmatter.md
+++ b/docs/blog/4.教程/frontmatter.md
@@ -266,7 +266,7 @@ books:
- 1984:
author: *gOrwell
- animal-farm:
- author: *gOrwell
+ author:*gOrwell
---
```
diff --git a/docs/en/blog/4.Tutorials/frontmatter.md b/docs/en/blog/4.Tutorials/frontmatter.md
index fb2074c7..807f759d 100644
--- a/docs/en/blog/4.Tutorials/frontmatter.md
+++ b/docs/en/blog/4.Tutorials/frontmatter.md
@@ -269,7 +269,7 @@ books:
- 1984:
author: *gOrwell
- animal-farm:
- author: *gOrwell
+ author:*gOrwell
---
```
diff --git a/docs/en/guide/chart/flowchart.md b/docs/en/guide/chart/flowchart.md
index 2cc82d7c..672fdd53 100644
--- a/docs/en/guide/chart/flowchart.md
+++ b/docs/en/guide/chart/flowchart.md
@@ -346,6 +346,6 @@ Symbols that should probably not be used in text: `=>`, `->`, `:>`, `|`, `@>`, a
To emphasize a specific path in the flowchart, you can additionally define it as follows:
-```
+```md
st@>op1({"stroke":"Red"})@>cond({"stroke":"Red","stroke-width":6,"arrow-end":"classic-wide-long"})@>c2({"stroke":"Red"})@>op2({"stroke":"Red"})@>e({"stroke":"Red"})
```
diff --git a/docs/en/guide/chart/plantuml.md b/docs/en/guide/chart/plantuml.md
index 8ec2b8e4..51b06188 100644
--- a/docs/en/guide/chart/plantuml.md
+++ b/docs/en/guide/chart/plantuml.md
@@ -260,7 +260,7 @@ object NewYork
map CapitalCity {
UK *-> London
- USA *--> Washington
+ USA*--> Washington
Germany *---> Berlin
}
@@ -427,9 +427,9 @@ rectangle "Investigate" as I <<$bProcess>><> #Business
rectangle "Pay" as P <<$bProcess>><> #Business
HC *-down- CI
-HC *-down- NAS
+HC*-down- NAS
HC *-down- V
-HC *-down- I
+HC*-down- I
HC *-down- P
CI -right->> NAS
@@ -574,16 +574,16 @@ caption figure 1
title My super title
* <&flag>Debian
-** <&globe>Ubuntu
-*** Linux Mint
+**<&globe>Ubuntu
+***Linux Mint
*** Kubuntu
-*** Lubuntu
+***Lubuntu
*** KDE Neon
** <&graph>LMDE
-** <&pulse>SolydXK
+**<&pulse>SolydXK
** <&people>SteamOS
** <&star>Raspbian with a very long name
-***
Raspmbc => OSMC
+***Raspmbc => OSMC
*** Raspyfi => Volumio
header
@@ -630,9 +630,9 @@ endlegend
```md
@startjson
-#highlight "lastName"
-#highlight "address" / "city"
-#highlight "phoneNumbers" / "0" / "number"
+# highlight "lastName"
+# highlight "address" / "city"
+# highlight "phoneNumbers" / "0" / "number"
{
"firstName": "John",
"lastName": "Smith",
diff --git a/docs/en/guide/code/features.md b/docs/en/guide/code/features.md
index 0aa51d64..daf2fc4e 100644
--- a/docs/en/guide/code/features.md
+++ b/docs/en/guide/code/features.md
@@ -49,7 +49,7 @@ for example `:line-numbers=2` indicates that line numbers in the code block star
**Input:**
-````
+````md
```ts:line-numbers
// Line numbers enabled
const line2 = 'This is line 2'
@@ -95,7 +95,7 @@ Add `{xxxx}` immediately after `[lang]` to enable line highlighting, where `xxx`
**Input:**
-````
+````md
```js{4}
export default {
data () {
@@ -127,7 +127,7 @@ In addition to single lines, you can specify multiple single lines, line ranges,
**Input:**
-````
+````md
```js{1,4,6-8}
export default { // Highlighted
data () {
@@ -163,10 +163,10 @@ You can also use the `// [!code highlight]` comment to enable line highlighting.
**Input:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
msg: 'Highlighted!' // [\!code highlight]
}
@@ -195,10 +195,10 @@ Additionally, you can use `// [!code focus:]` to define the number of lin
**Input:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
msg: 'Focused!' // [\!code focus]
}
@@ -242,10 +242,10 @@ Adding `// [!code --]` or `// [!code ++]` comments to a line will create a diff
**Input:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
error: 'Removed', // [\!code --]
warning: 'Added' // [\!code ++]
@@ -289,10 +289,10 @@ Adding `// [!code warning]` or `// [!code error]` comments to a line will apply
**Input:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
error: 'Error', // [\!code error]
warning: 'Warning' // [\!code warning]
@@ -334,7 +334,7 @@ mkdir hello && cd hello # [!code warning]
**Input:**
-````
+````md
```ts
export function foo() { // [\!code word:Hello]
const msg = 'Hello World'
@@ -357,7 +357,7 @@ will highlight only the first two occurrences of `options`.
**Input:**
-````
+````md
```ts
// [\!code word:options:2]
const options = { foo: 'bar' }
diff --git a/docs/en/guide/components/card-masonry.md b/docs/en/guide/components/card-masonry.md
index 00f95f1d..75844c56 100644
--- a/docs/en/guide/components/card-masonry.md
+++ b/docs/en/guide/components/card-masonry.md
@@ -61,7 +61,7 @@ In Markdown, the `::: card-masonry` container can be used instead of `
-
+
@@ -79,17 +79,17 @@ Masonry layout is particularly suitable for displaying images. You can directly
``` md
::: card-masonry
-
+
-
+
-
+
-
+
-
+
-
+
:::
```
diff --git a/docs/en/guide/features/image-preview.md b/docs/en/guide/features/image-preview.md
index 31532906..a271a8cc 100644
--- a/docs/en/guide/features/image-preview.md
+++ b/docs/en/guide/features/image-preview.md
@@ -36,11 +36,11 @@ For more configuration options, please refer to [@vuepress/plugin-photo-swipe](h
Image preview can be disabled by using the `no-view` or `ignore` class names, or the `no-view` attribute.
```md
-{.no-view}
-{.ignore}
-{no-view}
+{.no-view}
+{.ignore}
+{no-view}
-
-
-
+
+
+
```
diff --git a/docs/en/guide/features/replace-assets.md b/docs/en/guide/features/replace-assets.md
index 0b740da8..41a7c7fc 100644
--- a/docs/en/guide/features/replace-assets.md
+++ b/docs/en/guide/features/replace-assets.md
@@ -90,7 +90,7 @@ In markdown, use local asset paths directly:
```md

-
+
```
In `javascript`:
diff --git a/docs/en/guide/markdown/icons.md b/docs/en/guide/markdown/icons.md
index aa5c8f72..0edccd3f 100644
--- a/docs/en/guide/markdown/icons.md
+++ b/docs/en/guide/markdown/icons.md
@@ -391,7 +391,7 @@ Output:
[Add more style support for Fontawesome](https://docs.fontawesome.com/web/style/styling){.read-more}
-```
+```md
::circle-user 2xl::
::circle-user rotate-90::
::circle-user beat::
diff --git a/docs/en/guide/markdown/plot.md b/docs/en/guide/markdown/plot.md
index 63ff2914..4697e3f5 100644
--- a/docs/en/guide/markdown/plot.md
+++ b/docs/en/guide/markdown/plot.md
@@ -84,7 +84,7 @@ You can also control behavior through attribute syntax:
Use the `plot` option in Frontmatter to control the default behavior of this feature on the current page:
-```
+```md
---
plot:
trigger: hover
diff --git a/docs/en/guide/markdown/tabs.md b/docs/en/guide/markdown/tabs.md
index 577fdfb9..558cad79 100644
--- a/docs/en/guide/markdown/tabs.md
+++ b/docs/en/guide/markdown/tabs.md
@@ -77,7 +77,7 @@ which represent the bound value of the tab and whether the tab is currently acti
**Input:**
-````
+````md
::: tabs
@tab npm
diff --git a/docs/en/guide/repl/frontend.md b/docs/en/guide/repl/frontend.md
index 5b614345..229be616 100644
--- a/docs/en/guide/repl/frontend.md
+++ b/docs/en/guide/repl/frontend.md
@@ -532,7 +532,8 @@ Using the demo container to wrap demo code in a markdown file allows for quick d
/* css code */
```
:::
-```
+````
+
::::
You can also wrap `::: code-tabs` within `::: demo` for better code block presentation:
@@ -562,7 +563,8 @@ You can also wrap `::: code-tabs` within `::: demo` for better code block presen
```
:::
::::
-```
+````
+
:::::
---
diff --git a/docs/guide/chart/flowchart.md b/docs/guide/chart/flowchart.md
index f2e368a7..b59bbef2 100644
--- a/docs/guide/chart/flowchart.md
+++ b/docs/guide/chart/flowchart.md
@@ -342,6 +342,6 @@ e=>end: End:>http://www.yahoo.com
如果要在流程图中强调特定路径,则可以另外定义它,如下所示:
-```
+```md
st@>op1({"stroke":"Red"})@>cond({"stroke":"Red","stroke-width":6,"arrow-end":"classic-wide-long"})@>c2({"stroke":"Red"})@>op2({"stroke":"Red"})@>e({"stroke":"Red"})
```
diff --git a/docs/guide/chart/plantuml.md b/docs/guide/chart/plantuml.md
index 192231ce..e11ff3dc 100644
--- a/docs/guide/chart/plantuml.md
+++ b/docs/guide/chart/plantuml.md
@@ -260,7 +260,7 @@ object NewYork
map CapitalCity {
UK *-> London
- USA *--> Washington
+ USA*--> Washington
Germany *---> Berlin
}
@@ -427,9 +427,9 @@ rectangle "Investigate" as I <<$bProcess>><> #Business
rectangle "Pay" as P <<$bProcess>><> #Business
HC *-down- CI
-HC *-down- NAS
+HC*-down- NAS
HC *-down- V
-HC *-down- I
+HC*-down- I
HC *-down- P
CI -right->> NAS
@@ -574,16 +574,16 @@ caption figure 1
title My super title
* <&flag>Debian
-** <&globe>Ubuntu
-*** Linux Mint
+**<&globe>Ubuntu
+***Linux Mint
*** Kubuntu
-*** Lubuntu
+***Lubuntu
*** KDE Neon
** <&graph>LMDE
-** <&pulse>SolydXK
+**<&pulse>SolydXK
** <&people>SteamOS
** <&star>Raspbian with a very long name
-*** Raspmbc => OSMC
+***Raspmbc => OSMC
*** Raspyfi => Volumio
header
@@ -630,9 +630,9 @@ endlegend
```md
@startjson
-#highlight "lastName"
-#highlight "address" / "city"
-#highlight "phoneNumbers" / "0" / "number"
+# highlight "lastName"
+# highlight "address" / "city"
+# highlight "phoneNumbers" / "0" / "number"
{
"firstName": "John",
"lastName": "Smith",
diff --git a/docs/guide/code/features.md b/docs/guide/code/features.md
index 682ee6aa..7ee69572 100644
--- a/docs/guide/code/features.md
+++ b/docs/guide/code/features.md
@@ -48,7 +48,7 @@ export default defineUserConfig({
**输入:**
-````
+````md
```ts:line-numbers
// 启用行号
const line2 = 'This is line 2'
@@ -94,7 +94,7 @@ const line4 = 'This is line 4'
**输入:**
-````
+````md
```js{4}
export default {
data () {
@@ -126,7 +126,7 @@ export default {
**输入:**
-````
+````md
```js{1,4,6-8}
export default { // Highlighted
data () {
@@ -162,10 +162,10 @@ export default { // Highlighted
**输入:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
msg: 'Highlighted!' // [\!code highlight]
}
@@ -194,10 +194,10 @@ export default {
**输入:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
msg: 'Focused!' // [\!code focus]
}
@@ -241,10 +241,10 @@ pnpm install
**输入:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
error: 'Removed', // [\!code --]
warning: 'Added' // [\!code ++]
@@ -288,10 +288,10 @@ mkdir hello && cd hello # [!code ++]
**输入:**
-````
+````md
```js
export default {
- data () {
+ data() {
return {
error: 'Error', // [\!code error]
warning: 'Warning' // [\!code warning]
@@ -333,7 +333,7 @@ mkdir hello && cd hello # [!code warning]
**输入:**
-````
+````md
```ts
export function foo() { // [\!code word:Hello]
const msg = 'Hello World'
@@ -355,7 +355,7 @@ export function foo() { // [!code word:Hello]
**输入:**
-````
+````md
```ts
// [\!code word:options:2]
const options = { foo: 'bar' }
diff --git a/docs/guide/components/card-masonry.md b/docs/guide/components/card-masonry.md
index eb7f6fa2..a8ea7069 100644
--- a/docs/guide/components/card-masonry.md
+++ b/docs/guide/components/card-masonry.md
@@ -59,7 +59,7 @@ permalink: /guide/components/card-masonry/
``` md
::: card-masonry cols="3" gap="16"
-
+
@@ -77,17 +77,19 @@ permalink: /guide/components/card-masonry/
``` md
::: card-masonry
-
+
-
+
-
+
-
+
-
+
-
+
+
+
:::
```
diff --git a/docs/guide/features/image-preview.md b/docs/guide/features/image-preview.md
index a81737a9..19ed6d09 100644
--- a/docs/guide/features/image-preview.md
+++ b/docs/guide/features/image-preview.md
@@ -36,11 +36,11 @@ export default defineUserConfig({
可以通过 `no-view` 或 `ignore` 类名,或者 `no-view` 属性来忽略图片预览。
```md
-{.no-view}
-{.ignore}
-{no-view}
+{.no-view}
+{.ignore}
+{no-view}
-
-
-
+
+
+
```
diff --git a/docs/guide/features/replace-assets.md b/docs/guide/features/replace-assets.md
index 0d85e924..e2480f60 100644
--- a/docs/guide/features/replace-assets.md
+++ b/docs/guide/features/replace-assets.md
@@ -89,7 +89,7 @@ export default defineUserConfig({
```md

-
+
```
在 `javascript` 中:
diff --git a/docs/guide/markdown/basic.md b/docs/guide/markdown/basic.md
index c9750ee8..615ae91b 100644
--- a/docs/guide/markdown/basic.md
+++ b/docs/guide/markdown/basic.md
@@ -411,7 +411,7 @@ end tell
在代码块里面, `&` 、 `<` 和 `>` 会自动转成 HTML 实体,这样的方式让你非常容易使用 Markdown 插入范例用的 HTML 原始码,只需要复制粘贴,再加上缩进就可以了,剩下的 Markdown 都会帮你处理,例如:
````md
-```
+```html
diff --git a/docs/guide/markdown/icons.md b/docs/guide/markdown/icons.md
index 17dba545..5a63c979 100644
--- a/docs/guide/markdown/icons.md
+++ b/docs/guide/markdown/icons.md
@@ -389,7 +389,7 @@ Fontawesome 的免费图标仅支持 `solid` 、部分 `regular` 以及 `brands`
[为 Fontawesome 添加更多样式支持](https://docs.fontawesome.com/web/style/styling){.read-more}
-```
+```md
::circle-user 2xl::
::circle-user rotate-90::
::circle-user beat::
diff --git a/docs/guide/markdown/plot.md b/docs/guide/markdown/plot.md
index 14c3692e..4371bc6e 100644
--- a/docs/guide/markdown/plot.md
+++ b/docs/guide/markdown/plot.md
@@ -83,7 +83,7 @@ interface PlotOptions {
在 Frontmatter 中使用 `plot` 选项来控制在当前页面中该功能的默认行为:
-```
+```md
---
plot:
trigger: hover
diff --git a/docs/guide/markdown/tabs.md b/docs/guide/markdown/tabs.md
index 407b2169..be9b8e08 100644
--- a/docs/guide/markdown/tabs.md
+++ b/docs/guide/markdown/tabs.md
@@ -77,7 +77,7 @@ permalink: /guide/markdown/tabs/
**输入:**
-````
+````md
::: tabs
@tab npm
diff --git a/docs/guide/repl/frontend.md b/docs/guide/repl/frontend.md
index 7ef0de5d..9aca61d4 100644
--- a/docs/guide/repl/frontend.md
+++ b/docs/guide/repl/frontend.md
@@ -522,7 +522,8 @@ export default defineComponent({
/* css 代码 */
```
:::
-```
+````
+
::::
还可以在 `::: demo` 中包裹 `::: code-tabs` 以获得更好的代码块展示效果:
@@ -552,7 +553,8 @@ export default defineComponent({
```
:::
::::
-```
+````
+
:::::
---
diff --git a/eslint.config.js b/eslint.config.js
index 5f165cc1..1d47ac08 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -35,4 +35,24 @@ export default config({
'eslint-comments/no-unlimited-disable': 'off',
'antfu/no-top-level-await': 'off',
},
+}, {
+ files: [
+ 'docs/blog/1.示例/markdown基础.md',
+ 'docs/blog/4.教程/frontmatter.md',
+ 'docs/en/guide/markdown/basic.md',
+ 'docs/en/guide/chart/plantuml.md',
+ 'docs/en/blog/4.Tutorials/frontmatter.md',
+ 'docs/en/guide/markdown/env.md',
+ 'docs/guide/chart/plantuml.md',
+ 'docs/guide/markdown/annotation.md',
+ 'docs/guide/markdown/basic.md',
+ 'docs/guide/markdown/env.md',
+ ].map(file => [file, `${file}/*.md`]).flat(),
+ rules: {
+ 'markdown/no-unused-definitions': 'off',
+ 'markdown/no-duplicate-definitions': 'off',
+ 'markdown/no-multiple-h1': 'off',
+ 'markdown/no-space-in-emphasis': 'off',
+ 'markdown/no-missing-atx-heading-space': 'off',
+ },
})
diff --git a/patches/README.md b/patches/README.md
index f09d5bd9..987ba81d 100644
--- a/patches/README.md
+++ b/patches/README.md
@@ -18,7 +18,7 @@
当在项目中启用了 `twoslash` 功能,并额外安装了 `@vuepress/shiki-twoslash` 包,在项目进行 `vuepress build` 构建部署包并部署后。
访问部署后的站点,在有使用 `twoslash` 功能的相关页面,会出现下面的错误信息:
-```
+```txt
hydration mismatch
```