Skip to content
Snippets Groups Projects
Commit 4da8e405 authored by Marco Fernandes's avatar Marco Fernandes
Browse files

Fix regular expression

parent df1b3513
No related branches found
Tags 8.x-1.0-alpha6
No related merge requests found
......@@ -574,7 +574,7 @@ function gutenberg_entity_presave($entity) {
// 3: closing block comment tag
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// get block attributes
$re = '/((<!-- .*?({[\s\S]*?}).*-->)|(<!-- .*?({[\s\S]*?}).*\/-->))/m';
$re = '/((<!-- .*?({[\s\S]*}).*-->)|(<!-- .*?({[\s\S]*}).*\/-->))/m';
$tag = $matches[0][2] !== '' ? $matches[0][2] : $matches[0][1];
preg_match_all($re, $tag, $attrs, PREG_SET_ORDER, 0);
$attributes = json_decode($attrs[0][3], true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment