-
Notifications
You must be signed in to change notification settings - Fork 76
refactor(plugin-shiki): add jsdoc and improve docs #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances code documentation and refines user-facing docs for the @vuepress/plugin-shiki
plugin.
- Added comprehensive JSDoc comments to utility, type, and plugin implementation files.
- Renamed local
options
merge toshikiOptions
inshikiPlugin.ts
for clarity. - Polished both English and Chinese documentation in
docs/
for grammar, phrasing, and consistency.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
plugins/markdown/plugin-shiki/src/node/utils.ts | Added JSDoc for resolveLanguage and attrsToLines |
plugins/markdown/plugin-shiki/src/node/types.ts | Added JSDoc to Shiki-related type definitions |
plugins/markdown/plugin-shiki/src/node/options.ts | Documented plugin options with JSDoc |
plugins/markdown/plugin-shiki/src/node/shikiPlugin.ts | Renamed merged options to shikiOptions and added JSDoc to plugin entry |
plugins/markdown/plugin-shiki/src/node/markdown/preWrapperPlugin.ts | Added JSDoc for preWrapperPlugin |
plugins/markdown/plugin-shiki/src/node/markdown/highlighter/getHighLightFunction.ts | Added JSDoc for getHighLightFunction |
plugins/markdown/plugin-shiki/src/node/markdown/highlighter/createShikiHighlighter.ts | Added JSDoc for createShikiHighlighter and ShikiLoadLang |
plugins/markdown/plugin-shiki/src/node/markdown/highlighter/createMarkdownFilePathGetter.ts | Added JSDoc for createMarkdownFilePathGetter |
docs/zh/plugins/markdown/shiki.md | Refined Chinese grammar and phrasing |
docs/plugins/markdown/shiki.md | Refined English grammar and phrasing |
Comments suppressed due to low confidence (1)
plugins/markdown/plugin-shiki/src/node/markdown/highlighter/createShikiHighlighter.ts:39
- [nitpick] The
@default
tag for theenableVPre
parameter is ambiguous; consider using@param enableVPre - Whether to enable v-pre transformer (default: true)
or align with the project’s JSDoc conventions for default values.
* @default enableVPre: true
- `'disable'`:完全禁用行号,`:line-numbers` 标记不生效。 | ||
|
||
你可以在代码块添加 `:line-numbers` / `:no-line-numbers` 标记来覆盖配置项中的设置,还可以在 `:line-numbers` 之后添加 `=` 来自定义起始行号,例如 `:line-numbers=2` 表示代码块中的行号从 `2` 开始。 | ||
你可以在代码块添加 `:line-numbers` / `:no-line-numbers` 标记来覆盖配置项设置,还可以在 `:line-numbers` 之后添加 `=` 来自定义起始行号,例如 `:line-numbers=2` 表示代码块行号从 `2` 开始。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar: consider adding 中
after 代码块
(在代码块中添加
) to improve readability.
你可以在代码块添加 `:line-numbers` / `:no-line-numbers` 标记来覆盖配置项设置,还可以在 `:line-numbers` 之后添加 `=` 来自定义起始行号,例如 `:line-numbers=2` 表示代码块行号从 `2` 开始。 | |
你可以在代码块中添加 `:line-numbers` / `:no-line-numbers` 标记来覆盖配置项设置,还可以在 `:line-numbers` 之后添加 `=` 来自定义起始行号,例如 `:line-numbers=2` 表示代码块行号从 `2` 开始。 |
Copilot uses AI. Check for mistakes.
- `'disable'`:完全禁用代码块折叠,`:collapsed-lines` 标记不生效。 | ||
|
||
你可以在代码块添加 `:collapsed-lines` / `:no-collapsed-lines` 标记来覆盖配置项中的设置。还可以在 `:collapsed-lines` 之后添加 `=` 来自定义起始折叠行号,例如 `:collapsed-lines=12` 表示代码块从第 12 行开始折叠。 | ||
你可以在代码块添加 `:collapsed-lines` / `:no-collapsed-lines` 标记来覆盖配置项设置。还可以在 `:collapsed-lines` 之后添加 `=` 来自定义起始折叠行号,例如 `:collapsed-lines=12` 表示代码块从第 12 行开始折叠。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar: consider adding 中
after 代码块
(在代码块中添加
) for consistency with other sections.
你可以在代码块添加 `:collapsed-lines` / `:no-collapsed-lines` 标记来覆盖配置项设置。还可以在 `:collapsed-lines` 之后添加 `=` 来自定义起始折叠行号,例如 `:collapsed-lines=12` 表示代码块从第 12 行开始折叠。 | |
你可以在代码块中添加 `:collapsed-lines` / `:no-collapsed-lines` 标记来覆盖配置项设置。还可以在 `:collapsed-lines` 之后添加 `=` 来自定义起始折叠行号,例如 `:collapsed-lines=12` 表示代码块从第 12 行开始折叠。 |
Copilot uses AI. Check for mistakes.
Pull Request Test Coverage Report for Build 15460930285Details
💛 - Coveralls |
No description provided.