PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/autop/index.js +2 -2 23.8.0 → trunk View file →
@@ -153,10 +153,10 @@
153 153 "$1"
154 154 );
155 155 if (br) {
156 156 text = text.replace(
157 - /<(script|style).*?<\/\\1>/g,
158 - (match) => match[0].replace(/\n/g, "<WPPreserveNewline />")
157 + /<(script|style|svg|math)[\s\S]*?<\/\1>/g,
158 + (match) => match.replace(/\n/g, "<WPPreserveNewline />")
159 159 );
160 160 text = text.replace(/<br>|<br\/>/g, "<br />");
161 161 text = text.replace(
162 162 /(<br \/>)?\s*\n/g,