Merge pull request #1306 from scm-manager/bugfix/markdown_detection

Fix detection of markdown files for files having content does not sta…
This commit is contained in:
eheimbuch
2020-08-27 11:30:47 +02:00
committed by GitHub
7 changed files with 123 additions and 6 deletions

View File

@@ -87,7 +87,7 @@ class SourcesView extends React.Component<Props, State> {
const basePath = this.createBasePath();
if (contentType.startsWith("image/")) {
return <ImageViewer file={file} />;
} else if (contentType.includes("markdown")) {
} else if (contentType.includes("markdown") || (language && language.toLowerCase() === "markdown")) {
return <SwitchableMarkdownViewer file={file} basePath={basePath} />;
} else if (language) {
return <SourcecodeViewer file={file} language={language} />;