vuepress / ecosystem

Official plugins and themes for VuePress2
https://ecosystem.vuejs.press
MIT License
20 stars 26 forks source link

feat: migrate the `codePlugin` from `@vuepress/markdown` to `plugin-shiki` and `plugin-prismjs` #137

Closed pengzhanbo closed 1 month ago

pengzhanbo commented 1 month ago

Before submitting the PR, please make sure you do the following

What is the purpose of this pull request?

Description

see https://github.com/vuepress/core/issues/1550

Screenshots

Before

After

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 9156129729

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
plugins/plugin-prismjs/src/node/parser/notation.ts 32 33 96.97%
plugins/plugin-shiki/src/node/resolveHighlight.ts 26 28 92.86%
plugins/plugin-prismjs/src/node/parser/getCodeParser.ts 42 45 93.33%
plugins/plugin-prismjs/src/node/prismjsPlugin.ts 0 4 0.0%
<!-- Total: 296 306 96.73% -->
Totals Coverage Status
Change from base Build 9123655949: 7.3%
Covered Lines: 993
Relevant Lines: 1567

💛 - Coveralls
Mister-Hope commented 1 month ago

Also check #135

pengzhanbo commented 1 month ago

Also check #135

It appears that the current shikiSetup() has already implemented the same functionality.

meteorlxy commented 1 month ago

Same here. UT or E2E is required

pengzhanbo commented 1 month ago

Same here. UT or E2E is required

Added test cases identical to the codePlugin in @vuepress/core.

pengzhanbo commented 1 month ago

@meteorlxy @Mister-Hope Cc, this PR is ready.