Closed pengzhanbo closed 1 month ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
plugins/plugin-prismjs/src/node/prismjsPlugin.ts | 0 | 1 | 0.0% | ||
<!-- | Total: | 24 | 25 | 96.0% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
plugins/plugin-prismjs/src/node/prismjsPlugin.ts | 1 | 4.35% | ||
<!-- | Total: | 1 | --> |
Totals | |
---|---|
Change from base Build 9161313702: | 1.5% |
Covered Lines: | 1048 |
Relevant Lines: | 1617 |
Also, I did not find any thing about vp-copy-ignore
class in current codes, so what's this option for?
When users are using twosplash, can we still provide the correct content?
BTW, I still dislike this PR change, as it splits a whole copy-code functionality inside 2 plugins, and users do not benefit from it in most cases.
The only thing it improves is removing a delay option, but the docs will confuse both the developers and the users. The ideal situation is that every theme should have a highlighter built-in, and if it does not bundle the copy code plugin, then users might get greatly confused when reading the copy code plugin docs.
We don't need any SSG render or SEO with the copy button actually, we just need a client side a11y support.
The things I actually concern is that can the 2 highlighter plugin provide a client side transformer, guiding the copy code plugin to make some transform to get the correct code.
Also, I did not find any thing about
vp-copy-ignore
class in current codes, so what's this option for?When users are using twosplash, can we still provide the correct content?
For example, using twoslash
will inject additional content into the code block, and you can also add a class name vp-copy-ignore
to this additional content to prevent it from being copied. You can think of vp-copy-ignore
as a preset. I have considered making ignore
an optional configuration.
Before submitting the PR, please make sure you do the following
close #123
).What is the purpose of this pull request?
Description
plugin-prismjs
/plugin-shiki
, and insert it into the code block.plugin-copy-code
only provides functionality for the copy button and default styles.