Skip to content

Commit ec7d815

Browse files
committed
Remove trailing </p>
1 parent 943bc3c commit ec7d815

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default function stripParagraphContainer(html: string): string {
2-
return html.replace(/^<p\sxmlns="http:\/\/www.w3.org\/1999\/xhtml">/u, '').replace(/<\/p>$/u, '');
2+
return html.trim().replace(/^<p\sxmlns="http:\/\/www.w3.org\/1999\/xhtml">/u, '').replace(/<\/p>$/u, '');
33
}

0 commit comments

Comments
 (0)