Skip to content

Commit

Permalink
json/yaml: Enable YAML syntax highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Jul 5, 2024
1 parent e07babd commit b9b0ece
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"type": "module",
"dependencies": {
"@codemirror/lang-json": "^6.0.1",
"@codemirror/lang-yaml": "^6.1.1",
"@codemirror/theme-one-dark": "^6.1.2",
"ajv": "^8.16.0",
"ansi-to-html": "^0.7.2",
Expand Down
24 changes: 24 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/routes/json/yaml/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script>
import { json } from "@codemirror/lang-json";
import { yaml } from "@codemirror/lang-yaml";
import SymmetricInputOutput from "$lib/components/symmetric-input-output.svelte";
import Tool from "$lib/components/tool.svelte";
Expand All @@ -22,5 +23,6 @@
toTitle="YAML"
useCodeMirror={true}
leftLang={json()}
rightLang={yaml()}
{to} {from} />
</Tool>

0 comments on commit b9b0ece

Please sign in to comment.