Socket
Socket
Sign inDemoInstall

svelte-rune-highlight

Package Overview
Dependencies
20
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    svelte-rune-highlight

A highlight library for Svelte 5 with Rune


Version published
Weekly downloads
73
decreased by-60.96%
Maintainers
1
Install size
6.29 MB
Created
Weekly downloads
 

Changelog

Source

0.5.9

Patch Changes

  • fix: use closing tag </div> (24548b69c37d4e99c44a05487ea2404725bd6396) tests: add home and highlight tests

Readme

Source

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

Keywords

FAQs

Last updated on 19 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc