feat: syntax highlighting on xml language

This commit is contained in:
liyasthomas
2022-03-09 11:26:10 +05:30
parent 845f67e86e
commit 33607ad4ac
2 changed files with 7 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ import {
} from "@nuxtjs/composition-api"
import { javascriptLanguage } from "@codemirror/lang-javascript"
import { xmlLanguage } from "@codemirror/lang-xml"
import { jsonLanguage } from "@codemirror/lang-json"
import { GQLLanguage } from "@hoppscotch/codemirror-lang-graphql"
import { pipe } from "fp-ts/function"
@@ -136,6 +137,8 @@ const getLanguage = (langMime: string): Language | null => {
return javascriptLanguage
} else if (langMime === "graphql") {
return GQLLanguage
} else if (langMime === "application/xml") {
return xmlLanguage
} else if (langMime === "htmlmixed") {
return StreamLanguage.define(html)
} else if (langMime === "application/x-sh") {

View File

@@ -44,6 +44,7 @@
"@codemirror/history": "^0.19.2",
"@codemirror/lang-javascript": "^0.19.7",
"@codemirror/lang-json": "^0.19.2",
"@codemirror/lang-xml": "^0.19.2",
"@codemirror/language": "^0.19.8",
"@codemirror/legacy-modes": "^0.19.1",
"@codemirror/lint": "^0.19.6",
@@ -54,7 +55,7 @@
"@codemirror/stream-parser": "^0.19.7",
"@codemirror/text": "^0.19.6",
"@codemirror/tooltip": "^0.19.16",
"@codemirror/view": "^0.19.46",
"@codemirror/view": "^0.19.47",
"@hoppscotch/codemirror-lang-graphql": "workspace:^0.1.0",
"@hoppscotch/data": "workspace:^0.4.0",
"@hoppscotch/js-sandbox": "workspace:^2.0.0",
@@ -94,7 +95,7 @@
"paho-mqtt": "^1.1.0",
"postman-collection": "^4.1.1",
"qs": "^6.10.3",
"rxjs": "^7.5.4",
"rxjs": "^7.5.5",
"socket.io-client-v2": "npm:socket.io-client@^2.4.0",
"socket.io-client-v3": "npm:socket.io-client@^3.1.3",
"socket.io-client-v4": "npm:socket.io-client@^4.4.1",
@@ -135,7 +136,7 @@
"@nuxtjs/stylelint-module": "^4.1.0",
"@nuxtjs/svg": "^0.4.0",
"@relmify/jest-fp-ts": "^1.1.1",
"@sentry/browser": "^6.18.1",
"@sentry/browser": "^6.18.2",
"@testing-library/jest-dom": "^5.16.2",
"@types/codemirror": "^5.60.5",
"@types/cookie": "^0.4.1",