diff --git a/gradle/changelog/markdown_table_header_wrap.yaml b/gradle/changelog/markdown_table_header_wrap.yaml new file mode 100644 index 0000000000..813c4eaef8 --- /dev/null +++ b/gradle/changelog/markdown_table_header_wrap.yaml @@ -0,0 +1,2 @@ +- type: fixed + description: Remove forced word break from markdown view ([#2142](https://github.com/scm-manager/scm-manager/pull/2142)) 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 c05a43d3d9..71144befea 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -4895,7 +4895,7 @@ exports[`Storyshots MarkdownView Code without Lang 1`] = ` className="MarkdownViewstories__Spacing-sc-1lofakk-0 isVeYs" >

@@ -4964,7 +4964,7 @@ exports[`Storyshots MarkdownView Commit Links 1`] = ` className="MarkdownViewstories__Spacing-sc-1lofakk-0 isVeYs" >

{ ); }; +const HorizontalScrollDiv = styled.div` + overflow-x: auto; +`; + class LazyMarkdownView extends React.Component { static contextType = BinderContext; static defaultProps: Partial = { enableAnchorHeadings: false, - skipHtml: false + skipHtml: false, }; constructor(props: Props) { super(props); this.state = { - contentRef: null + contentRef: null, }; } @@ -150,7 +155,7 @@ class LazyMarkdownView extends React.Component { basePath, permalink, t, - mdastPlugins = [] + mdastPlugins = [], } = this.props; const rendererFactory = this.context.getExtension("markdown-renderer-factory"); @@ -207,27 +212,27 @@ class LazyMarkdownView extends React.Component { sanitize, merge(gh, { attributes: { - code: ["className"] // Allow className for code elements, this is necessary to extract the code language + code: ["className"], // Allow className for code elements, this is necessary to extract the code language }, clobberPrefix: "", // Do not prefix user-provided ids and class names, protocols: { - href: Object.keys(protocolLinkRendererExtensions) - } + href: Object.keys(protocolLinkRendererExtensions), + }, }) ) .use(rehype2react, { createElement: React.createElement, passNode: true, - components: createComponentList(remarkRendererList, { permalink }) + components: createComponentList(remarkRendererList, { permalink }), }); const renderedMarkdown: any = processor.processSync(content).result; return ( -
this.setState({ contentRef: el })} className="content is-word-break"> + this.setState({ contentRef: el })} className="content"> {renderedMarkdown} -
+
); }