mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 15:25:59 +00:00
feat: add xml-formatter
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<script>
|
||||
import hljs from 'highlight.js/lib/core';
|
||||
import xmlGrammar from './xmlGrammar';
|
||||
import formatXml from './formatXml';
|
||||
import xmlFormat from 'xml-formatter';
|
||||
import { afterUpdate, onMount } from 'svelte';
|
||||
|
||||
import 'highlight.js/styles/vs.css';
|
||||
|
||||
export let code = '';
|
||||
|
||||
$: formattedCode = formatXml(code);
|
||||
$: formattedCode = xmlFormat(code);
|
||||
|
||||
onMount(() => {
|
||||
hljs.registerLanguage('xml', xmlGrammar);
|
||||
|
||||
Reference in New Issue
Block a user