slidev
slidev copied to clipboard
Shiki Magic Move ignores transformers from ./setup/shiki.ts
- create setup/shiki.ts
- add some transformers eg
/* ./setup/shiki.ts */
import { defineShikiSetup } from '@slidev/types'
import { transformerNotationDiff, transformerNotationWordHighlight } from '@shikijs/transformers'
export default defineShikiSetup(() => {
return {
themes: {
'dark': 'min-light',
'light': 'min-light',
},
transformers: [
transformerNotationWordHighlight(),
]
}
})
2.1 add some basic styles for class highlighted-word
3. add new slide with some content with shiki magic move and some content without it
```html
// [!code word:article]
<article>
<h1>
Hello
</h1>
</article>
```
````md magic-move
```html
// [!code word:article]
<article>
<h1>
Hello
</h1>
</article>
```
````
- check the result
As i can see there is difference betwheen the magic move version and the version without it. In the documentation no clues about that. In the shiki config gide too.
- OS: windows 10
- Browser: Chrome 122.0.6261.112
- Slidev version: 0.48.7
I really want to use word highlighting + magic move. If it is not possible then the documentation should warn about it.
Thank You!
Unfortunately, Magic Move does not support transformers at this moment
Thank You for answering!
It's OK. Then, i think. the documentation should contain this information
Something like this: #1464