Marcador de sintaxis de estilo de código VS-Shiki. js
| Autor: | octref |
|---|---|
| Views Total: | 298 |
| Sitio oficial: | Ir a la web |
| Actualizado: | January 3, 2019 |
| Licencia: | MIT |
Vista prévia
Descripción
shiki.js is a fresh new Syntax, VS Code style syntax highlighter which uses Text Mate grammars to tokenize strings.
Funcionamiento
Installation.
# Yarn $ yarn add shiki # NPM $ npm install shiki --save
Import the shiki.js.
const shiki = require('shiki') Insert the code into <pre> and <code> tags.
<pre class="shiki"> <code> Your Code Here </code> </pre>
Initialize the shiki.js. Done.
shiki.getHighlighter({
theme: 'nord'
}).then(highlighter => {
// do something
})





