docsifyjs / docsifyjs/docsify

Shiki syntax highlight support

Aperta
#2,530 5 commenti 3 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
JavaScript
Stelle
31.5k
Fork
5.8k
Merge medio
9g 8h
PR unite (30g)
2

Descrizione

## Feature request

#### Problem or desire

Prism syntax highlight is quite bad (highlight.js is bad too).

#### Proposal

Support [Shiki](http://shiki.style/).

[Shiki](https://github.com/shikijs/shiki) has better syntax highlight because it uses TextMate grammar instead of shady regexp. It uses the same engine as in VS Code.

#### Implementation

I guess the only thing to do on doscify side, is to add a config option that allows to generate a different highlighter class prefix. That way all JS syntax highlighter could nearly be supported.

- shiki: css class `shiki`
- prism: css class `language-` prefix
- highlightjs: css class `hljs`

https://shiki.style/guide/install#cdn-usage

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.