Skip to content

Commit 499ba20

Browse files
committed
docs: improve markdown code blocks note
1 parent 5cfa771 commit 499ba20

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

docs/guide/markdown.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,11 @@ Config reference: [markdown.toc](../reference/config.md#markdown-toc)
156156

157157
Following code blocks extensions are implemented during markdown parsing in Node side. That means, the code blocks won't be processed in client side.
158158

159+
Notice that some of the code blocks features require theme support. The default theme of VuePress supports all of them, but community themes might not. You'd better check the theme documentation before using them.
160+
159161
#### Code Title
160162

161-
You can specify the title of the code block by adding a `title` key-value mark in your fenced code blocks. Note: This requires theme support.
163+
You can specify the title of the code block by adding a `title` key-value mark in your fenced code blocks.
162164

163165
**Input**
164166

@@ -196,7 +198,7 @@ It can be used in combination with the other marks below. Please leave a space b
196198

197199
#### Line Highlighting
198200

199-
You can highlight specified lines of your code blocks by adding line ranges mark in your fenced code blocks. Note: This requires highlighter plugin and theme support.
201+
You can highlight specified lines of your code blocks by adding line ranges mark in your fenced code blocks.
200202

201203
**Input**
202204

@@ -246,7 +248,7 @@ Config reference: [markdown.code.highlightLines](../reference/config.md#markdown
246248

247249
You must have noticed that the number of lines is displayed on the left side of code blocks.
248250

249-
You can add `:line-numbers` / `:no-line-numbers` mark in your fenced code blocks to override the value set in config. Note: This requires highlighter plugin and theme support.
251+
You can add `:line-numbers` / `:no-line-numbers` mark in your fenced code blocks to override the value set in config.
250252

251253
**Input**
252254

docs/zh/guide/markdown.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,11 @@ Emoji 扩展由 [markdown-it-emoji](https://github.com/markdown-it/markdown-it-e
157157

158158
下列代码块扩展是在 Node 端进行 Markdown 解析的时候实现的。这意味着代码块并不会在客户端被处理。
159159

160+
需要注意的是,部分代码块功能需要主题支持。VuePress 默认主题支持所有这些功能,但社区主题有可能不支持。请查看你使用的主题文档来确认是否支持这些功能。
161+
160162
#### 代码标题
161163

162-
你可以在代码块添加一个 `title` 键值对来为代码块设置标题。提示:需要主题支持。
164+
你可以在代码块添加一个 `title` 键值对来为代码块设置标题。
163165

164166
**Input**
165167

@@ -197,7 +199,7 @@ export default defineUserConfig({
197199

198200
#### 行高亮
199201

200-
你可以在代码块添加行数范围标记,来为对应代码行进行高亮。提示:它需要高亮器插件和主题支持。
202+
你可以在代码块添加行数范围标记,来为对应代码行进行高亮。
201203

202204
**输入**
203205

@@ -245,7 +247,7 @@ export default defineUserConfig({
245247

246248
#### 行号
247249

248-
你肯定已经注意到在代码块的最左侧会展示行号。这个功能是默认启用的,你可以通过配置来禁用它。提示:它需要高亮器插件和主题支持。
250+
你肯定已经注意到在代码块的最左侧会展示行号。这个功能是默认启用的,你可以通过配置来禁用它。
249251

250252
你可以在代码块添加 `:line-numbers` / `:no-line-numbers` 标记来覆盖配置项中的设置。
251253

0 commit comments

Comments
 (0)