This library is a Svelte component library for syntax highlighting and showing differences in source code.
npm install svelte-diff-highlighting highlight.js
<script lang="ts">
import { Highlighted, Language } from 'svelte-diff-highlighting';
import 'highlight.js/styles/github-dark.css';
const sourceCode = `public static void main(String[] args) {
System.out.println("Hello, World!");
}`;
</script>
<Highlighted text={sourceCode} language={Language.java} />
https://lemo-nade-room.github.io/svelte-diff-highlighting
https://www.npmjs.com/package/svelte-diff-highlighting
This software is released under the MIT License. For more details, please refer to the LICENSE file.
Portions of this code are protected under copyright and are used under the terms of the BSD 3-Clause License: