diff --git a/src/utils/highlight.ts b/src/utils/highlight.ts index 23cdd43d..067afcb0 100644 --- a/src/utils/highlight.ts +++ b/src/utils/highlight.ts @@ -21,6 +21,7 @@ import 'prismjs/components/prism-scala.js'; import 'prismjs/components/prism-sql.js'; import 'prismjs/components/prism-swift.js'; import 'prismjs/components/prism-yaml.js'; +import 'prismjs/components/prism-csv.js'; const DEFAULT_LANG = 'clike'; diff --git a/src/utils/openapi.ts b/src/utils/openapi.ts index 93eeb3d9..2e47399f 100644 --- a/src/utils/openapi.ts +++ b/src/utils/openapi.ts @@ -395,6 +395,15 @@ export function langFromMime(contentType: string): string { if (contentType.search(/xml/i) !== -1) { return 'xml'; } + + if (contentType.search(/csv/i) !== -1) { + return 'csv'; + } + + if (contentType.search(/plain/i) !== -1) { + return 'tex'; + } + return 'clike'; }