Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/AlexxNB/highlightjs-svelte
- Owner: AlexxNB
- License: mit
- Created: 2019-11-24T16:18:23.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-20T01:34:57.000Z (over 2 years ago)
- Last Synced: 2024-11-12T09:08:58.471Z (3 months ago)
- Language: HTML
- Size: 169 KB
- Stars: 16
- Watchers: 2
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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;
```