File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export const kTextHtml = "text/html";
1111export const kTextMarkdown = "text/markdown" ;
1212export const kTextLatex = "text/latex" ;
1313export const kTextPlain = "text/plain" ;
14+ export const kTextXml = "text/xml" ;
1415export const kImagePng = "image/png" ;
1516export const kImageJpeg = "image/jpeg" ;
1617export const kImageSvg = "image/svg+xml" ;
@@ -57,7 +58,8 @@ export function isHtmlContent(path?: string) {
5758export 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
6365const 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" ,
You can’t perform that action at this time.
0 commit comments