Skip to content

Conversation

Mister-Hope
Copy link
Member

No description provided.

@Mister-Hope Mister-Hope requested a review from Copilot June 5, 2025 07:19
Copy link

@Copilot Copilot AI left a 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 to shikiOptions in shikiPlugin.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 the enableVPre 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` 开始。
Copy link
Preview

Copilot AI Jun 5, 2025

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.

Suggested change
你可以在代码块添加 `: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 行开始折叠。
Copy link
Preview

Copilot AI Jun 5, 2025

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.

Suggested change
你可以在代码块添加 `: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.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 15460930285

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 59.858%

Totals Coverage Status
Change from base Build 15460115560: 0.0%
Covered Lines: 1319
Relevant Lines: 1992

💛 - Coveralls

@Mister-Hope Mister-Hope merged commit b9fe061 into main Jun 5, 2025
30 checks passed
@Mister-Hope Mister-Hope deleted the shiki-refine branch June 5, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants