Skip to content

Commit b0cf102

Browse files
committed
fix: Markdown component can emit console error "invalid dom nesting" with nested <p>
part of #7856
1 parent db66434 commit b0cf102

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export default class Markdown extends React.PureComponent<Props> {
149149
.filter(_ => _)
150150
return <React.Fragment>{imageTags}</React.Fragment>
151151
} else if (/^<br\s*\/?>$/.test(props.value)) {
152-
return <p />
152+
return <br />
153153
} else if (/<a name=/.test(props.value)) {
154154
const nameMatch = props.value.match(/name="?([^"\s]+)"?/)
155155
if (nameMatch) {

0 commit comments

Comments
 (0)