Skip to content

Commit 9951edb

Browse files
authored
Handle <br> elements in subheadings (#13874)
1 parent 8d9f5d9 commit 9951edb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dotcom-rendering/src/components/SubheadingBlockComponent.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ export const buildElementTree =
4040
</Subheading>
4141
);
4242

43+
case 'BR':
44+
// <br> is a void element and cannot have children
45+
return jsx('br');
46+
4347
default:
4448
return jsx(node.tagName.toLowerCase(), {
4549
children: Array.from(node.childNodes).map(

0 commit comments

Comments
 (0)