Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/AlexxNB/highlightjs-svelte

Svelte Language Definition for Highlight.js
https://github.com/AlexxNB/highlightjs-svelte

Last synced: 3 months ago
JSON representation

Svelte Language Definition for Highlight.js

Awesome Lists containing this project

README

        

# highlightjs-svelte
Svelte language definition for Highlight.js

## install
```bash
npm i highlight.js highlightjs-svelte
```

## usage

### browser

```html

hljs.initHighlightingOnLoad();

Hello, {name}!

```

### node
```javascript
const hljs = require('highlight.js');
const hljs_svelte = require('highlightjs-svelte');

hljs_svelte(hljs);

const highlighted = hljs.highlight('svelte', source).value;
```