0.5.12 • Published 9 months ago

svelte-rune-highlight v0.5.12

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Svelte Rune Highlight

DEMO

Syntax highlighting for Svelte using highlight.js. This lib is ported from Svelte-Highlight.

Installation

Install Svelte 5 and enable runes in svelte.config.js:

import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {
  preprocess: [vitePreprocess({})],
  compilerOptions: {
    runes: true
  },
  kit: {
    adapters.
    adapter: adapter()
  }
};

export default config;

Install svelte-rune-highlight:

pnpm i -D svelte-rune-highlight highlight.js

Docs

Docs

Highlight component

Highlight

HighlightAuto component

HighlightAuto

HighlightSvelte component

HighlightSvelte

Line numbers

Line numbers

Custom wrapper

Custom wrapper

Credit

Svelte-Highlight

0.5.10

10 months ago

0.5.11

10 months ago

0.5.12

9 months ago

0.5.9

1 year ago

0.5.8

1 year ago

0.5.7

1 year ago

0.5.6

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.5.5

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.6

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago