Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit c08ec11

Browse files
committed
Allow preview of XML files
(useful for JATs)
1 parent 3820ede commit c08ec11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/mime.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { extname } from "path";
77

88
export const kTextHtml = "text/html";
99
export const kTextMarkdown = "text/markdown";
10+
export const kTextXml = "text/xml";
1011
export const kTextLatex = "text/latex";
1112
export const kTextPlain = "text/plain";
1213
export const kImagePng = "image/png";
@@ -52,7 +53,9 @@ export function isHtmlContent(path?: string) {
5253
export function isTextContent(path?: string) {
5354
return (
5455
path &&
55-
(contentType(path) === kTextMarkdown || contentType(path) === kTextPlain)
56+
(contentType(path) === kTextMarkdown ||
57+
contentType(path) === kTextPlain ||
58+
contentType(path) === kTextXml)
5659
);
5760
}
5861

0 commit comments

Comments
 (0)