mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
Fix detection of markdown files for files having content does not start with '#'
This commit is contained in:
@@ -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} />;
|
||||
|
||||
Reference in New Issue
Block a user