remove markdown formatting from MarkdownView component

This commit is contained in:
Eduard Heimbuch
2020-02-12 14:41:54 +01:00
parent e30796b995
commit 91753f16f0

View File

@@ -2,7 +2,6 @@ import React from "react";
import { withRouter, RouteComponentProps } from "react-router-dom";
// @ts-ignore
import Markdown from "react-markdown/with-html";
import styled from "styled-components";
import { binder } from "@scm-manager/ui-extensions";
import SyntaxHighlighter from "./SyntaxHighlighter";
import MarkdownHeadingRenderer from "./MarkdownHeadingRenderer";
@@ -15,35 +14,6 @@ type Props = RouteComponentProps & {
enableAnchorHeadings?: boolean;
};
const MarkdownWrapper = styled.div`
> .content {
> h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0.5rem 0;
font-size: 0.9rem;
}
> h1 {
font-weight: 700;
}
> h2 {
font-weight: 600;
}
> h3,
h4,
h5,
h6 {
font-weight: 500;
}
& strong {
font-weight: 500;
}
}
`;
class MarkdownView extends React.Component<Props> {
static defaultProps: Partial<Props> = {
enableAnchorHeadings: false,
@@ -94,7 +64,7 @@ class MarkdownView extends React.Component<Props> {
}
return (
<MarkdownWrapper ref={el => (this.contentRef = el)}>
<div ref={el => (this.contentRef = el)}>
<Markdown
className="content"
skipHtml={skipHtml}
@@ -102,7 +72,7 @@ class MarkdownView extends React.Component<Props> {
source={content}
renderers={rendererList}
/>
</MarkdownWrapper>
</div>
);
}
}