docsifyjs / docsifyjs/docsify

Shiki syntax highlight support

Open
#2,530 5 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
31.5k
Forks
5.8k
Avg merge
9d 8h
Merged PRs (30d)
2

Description

## 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.