diff --git a/CHANGELOG.md b/CHANGELOG.md index ebfa5b64f5..85bd3e6ae9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## 2.0.0-rc3 - 2020-01-31 ### Fixed - Broken plugin order fixed +- MarkdownViewer in code section renders markdown properly ## 2.0.0-rc2 - 2020-01-29 ### Added diff --git a/scm-ui/ui-components/src/MarkdownView.tsx b/scm-ui/ui-components/src/MarkdownView.tsx index 94930692b3..01a2b35512 100644 --- a/scm-ui/ui-components/src/MarkdownView.tsx +++ b/scm-ui/ui-components/src/MarkdownView.tsx @@ -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 { static defaultProps: Partial = { enableAnchorHeadings: false, @@ -94,7 +64,7 @@ class MarkdownView extends React.Component { } return ( - (this.contentRef = el)}> +
(this.contentRef = el)}> { source={content} renderers={rendererList} /> - +
); } } diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index 730e93136d..0ec9bb0c76 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -2,7 +2,7 @@ exports[`Storyshots Buttons|AddButton Default 1`] = `