Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 3761805

Browse files
starpitk8s-ci-robot
authored andcommitted
feat(plugins/plugin-client-common): add support for <br> in Markdown
part of #7715
1 parent db6eeef commit 3761805

File tree

1 file changed

+2
-0
lines changed
  • plugins/plugin-client-common/src/components/Content

1 file changed

+2
-0
lines changed

plugins/plugin-client-common/src/components/Content/Markdown.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ export default class Markdown extends React.PureComponent<Props> {
150150
})
151151
.filter(_ => _)
152152
return <React.Fragment>{imageTags}</React.Fragment>
153+
} else if (/^<br\s*\/?>$/.test(props.value)) {
154+
return <p />
153155
} else if (/<a name=/.test(props.value)) {
154156
const nameMatch = props.value.match(/name="?([^"\s]+)"?/)
155157
if (nameMatch) {

0 commit comments

Comments
 (0)