feat: syntax highlighting on xml language
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
|||||||
} from "@nuxtjs/composition-api"
|
} from "@nuxtjs/composition-api"
|
||||||
|
|
||||||
import { javascriptLanguage } from "@codemirror/lang-javascript"
|
import { javascriptLanguage } from "@codemirror/lang-javascript"
|
||||||
|
import { xmlLanguage } from "@codemirror/lang-xml"
|
||||||
import { jsonLanguage } from "@codemirror/lang-json"
|
import { jsonLanguage } from "@codemirror/lang-json"
|
||||||
import { GQLLanguage } from "@hoppscotch/codemirror-lang-graphql"
|
import { GQLLanguage } from "@hoppscotch/codemirror-lang-graphql"
|
||||||
import { pipe } from "fp-ts/function"
|
import { pipe } from "fp-ts/function"
|
||||||
@@ -136,6 +137,8 @@ const getLanguage = (langMime: string): Language | null => {
|
|||||||
return javascriptLanguage
|
return javascriptLanguage
|
||||||
} else if (langMime === "graphql") {
|
} else if (langMime === "graphql") {
|
||||||
return GQLLanguage
|
return GQLLanguage
|
||||||
|
} else if (langMime === "application/xml") {
|
||||||
|
return xmlLanguage
|
||||||
} else if (langMime === "htmlmixed") {
|
} else if (langMime === "htmlmixed") {
|
||||||
return StreamLanguage.define(html)
|
return StreamLanguage.define(html)
|
||||||
} else if (langMime === "application/x-sh") {
|
} else if (langMime === "application/x-sh") {
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
"@codemirror/history": "^0.19.2",
|
"@codemirror/history": "^0.19.2",
|
||||||
"@codemirror/lang-javascript": "^0.19.7",
|
"@codemirror/lang-javascript": "^0.19.7",
|
||||||
"@codemirror/lang-json": "^0.19.2",
|
"@codemirror/lang-json": "^0.19.2",
|
||||||
|
"@codemirror/lang-xml": "^0.19.2",
|
||||||
"@codemirror/language": "^0.19.8",
|
"@codemirror/language": "^0.19.8",
|
||||||
"@codemirror/legacy-modes": "^0.19.1",
|
"@codemirror/legacy-modes": "^0.19.1",
|
||||||
"@codemirror/lint": "^0.19.6",
|
"@codemirror/lint": "^0.19.6",
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
"@codemirror/stream-parser": "^0.19.7",
|
"@codemirror/stream-parser": "^0.19.7",
|
||||||
"@codemirror/text": "^0.19.6",
|
"@codemirror/text": "^0.19.6",
|
||||||
"@codemirror/tooltip": "^0.19.16",
|
"@codemirror/tooltip": "^0.19.16",
|
||||||
"@codemirror/view": "^0.19.46",
|
"@codemirror/view": "^0.19.47",
|
||||||
"@hoppscotch/codemirror-lang-graphql": "workspace:^0.1.0",
|
"@hoppscotch/codemirror-lang-graphql": "workspace:^0.1.0",
|
||||||
"@hoppscotch/data": "workspace:^0.4.0",
|
"@hoppscotch/data": "workspace:^0.4.0",
|
||||||
"@hoppscotch/js-sandbox": "workspace:^2.0.0",
|
"@hoppscotch/js-sandbox": "workspace:^2.0.0",
|
||||||
@@ -94,7 +95,7 @@
|
|||||||
"paho-mqtt": "^1.1.0",
|
"paho-mqtt": "^1.1.0",
|
||||||
"postman-collection": "^4.1.1",
|
"postman-collection": "^4.1.1",
|
||||||
"qs": "^6.10.3",
|
"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-v2": "npm:socket.io-client@^2.4.0",
|
||||||
"socket.io-client-v3": "npm:socket.io-client@^3.1.3",
|
"socket.io-client-v3": "npm:socket.io-client@^3.1.3",
|
||||||
"socket.io-client-v4": "npm:socket.io-client@^4.4.1",
|
"socket.io-client-v4": "npm:socket.io-client@^4.4.1",
|
||||||
@@ -135,7 +136,7 @@
|
|||||||
"@nuxtjs/stylelint-module": "^4.1.0",
|
"@nuxtjs/stylelint-module": "^4.1.0",
|
||||||
"@nuxtjs/svg": "^0.4.0",
|
"@nuxtjs/svg": "^0.4.0",
|
||||||
"@relmify/jest-fp-ts": "^1.1.1",
|
"@relmify/jest-fp-ts": "^1.1.1",
|
||||||
"@sentry/browser": "^6.18.1",
|
"@sentry/browser": "^6.18.2",
|
||||||
"@testing-library/jest-dom": "^5.16.2",
|
"@testing-library/jest-dom": "^5.16.2",
|
||||||
"@types/codemirror": "^5.60.5",
|
"@types/codemirror": "^5.60.5",
|
||||||
"@types/cookie": "^0.4.1",
|
"@types/cookie": "^0.4.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user