mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
remove markdown formatting from MarkdownView component
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user