obsidian-shiki-plugin icon indicating copy to clipboard operation
obsidian-shiki-plugin copied to clipboard

Update shiki version and support notationHightligh

Open LincZero opened this issue 8 months ago • 2 comments

  • current version: 1.24.0
  • latest version: 3.4.2
npm install shiki@latest

One feature supported by the new version is what I need: notationHightlight, notationDiff, ......

see https://shiki.style/packages/transformers#transformernotationdiff for detail

LincZero avatar May 18 '25 04:05 LincZero

I'm doing PR


some pr note:

main.ts::registerCodeBlockProcessors()
new CodeBlock()

CodeBlock.ts::CodeBlock::constructor()
render()

Highlighter.ts::renderWithEc();
ec.render(); toHtml()

I don't quite understand why. For now, I'll just directly codeToHtml.

There are some problem with the effect, but I'm not very good at fixing it.

LincZero avatar May 18 '25 04:05 LincZero

Grammar and Effect:

Image

LincZero avatar May 18 '25 08:05 LincZero

The shiki version has been updated

mProjectsCode avatar Sep 02 '25 14:09 mProjectsCode