Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gutenberg-3345209
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
gutenberg-3345209
Commits
4da8e405
Commit
4da8e405
authored
5 years ago
by
Marco Fernandes
Browse files
Options
Downloads
Patches
Plain Diff
Fix regular expression
parent
df1b3513
No related branches found
Branches containing commit
Tags
8.x-1.0-alpha6
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gutenberg.module
+1
-1
1 addition, 1 deletion
gutenberg.module
with
1 addition
and
1 deletion
gutenberg.module
+
1
−
1
View file @
4da8e405
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment