mirror of
https://github.com/foss42/apidash.git
synced 2025-05-23 17:26:45 +08:00
Fix svg contentType
This commit is contained in:
@ -288,6 +288,7 @@ const Map<String, Map<String, List<ResponseBodyView>>>
|
|||||||
|
|
||||||
const Map<String, String> kCodeHighlighterMap = {
|
const Map<String, String> kCodeHighlighterMap = {
|
||||||
kSubTypeHtml: "xml",
|
kSubTypeHtml: "xml",
|
||||||
|
kSubTypeSvg: "xml",
|
||||||
kSubTypeYaml: "yaml",
|
kSubTypeYaml: "yaml",
|
||||||
kSubTypeYml: "yaml",
|
kSubTypeYml: "yaml",
|
||||||
kSubTypeTextYaml: "yaml",
|
kSubTypeTextYaml: "yaml",
|
||||||
|
@ -94,6 +94,9 @@ MediaType? getMediaTypeFromHeaders(Map? headers) {
|
|||||||
var subtype = mediaType.subtype;
|
var subtype = mediaType.subtype;
|
||||||
//print(mediaType);
|
//print(mediaType);
|
||||||
if(kResponseBodyViewOptions.containsKey(type)){
|
if(kResponseBodyViewOptions.containsKey(type)){
|
||||||
|
if (kResponseBodyViewOptions[type]!.containsKey(subtype)){
|
||||||
|
return (kResponseBodyViewOptions[type]![subtype]!, kCodeHighlighterMap[subtype] ?? subtype);
|
||||||
|
}
|
||||||
if(subtype.contains(kSubTypeJson)){
|
if(subtype.contains(kSubTypeJson)){
|
||||||
subtype = kSubTypeJson;
|
subtype = kSubTypeJson;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user