Skip to content

Commit 9e07ede

Browse files
committed
Serve XML content in preview
1 parent 8c4b66a commit 9e07ede

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/core/mime.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const kTextHtml = "text/html";
1111
export const kTextMarkdown = "text/markdown";
1212
export const kTextLatex = "text/latex";
1313
export const kTextPlain = "text/plain";
14+
export const kTextXml = "text/xml";
1415
export const kImagePng = "image/png";
1516
export const kImageJpeg = "image/jpeg";
1617
export const kImageSvg = "image/svg+xml";
@@ -57,7 +58,8 @@ export function isHtmlContent(path?: string) {
5758
export function isTextContent(path?: string) {
5859
return !!path &&
5960
(contentType(path) === kTextMarkdown ||
60-
contentType(path) === kTextPlain);
61+
contentType(path) === kTextPlain ||
62+
contentType(path) === kTextXml);
6163
}
6264

6365
const MEDIA_TYPES: Record<string, string> = {
@@ -71,7 +73,7 @@ const MEDIA_TYPES: Record<string, string> = {
7173
".tex": kTextPlain,
7274
".adoc": kTextPlain,
7375
".asciidoc": kTextPlain,
74-
".xml": "text/xml",
76+
".xml": kTextXml,
7577
".ts": "text/typescript",
7678
".tsx": "text/tsx",
7779
".js": "application/javascript",

0 commit comments

Comments
 (0)