Skip to content

Commit b31e13d

Browse files
committed
Fix snippet parser regex as per #28
1 parent f286044 commit b31e13d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

classes/SnippetParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected static function extractSnippetsFromMarkup($markup, $theme)
7373
: $value;
7474
};
7575

76-
if (preg_match_all('#<figure\s+.+>[^<>]*</figure>#i', $markup, $matches)) {
76+
if (preg_match_all('#<figure\s+.+?>[^<>]*</figure>#i', $markup, $matches)) {
7777
foreach ($matches[0] as $snippetDeclaration) {
7878
$nameMatch = [];
7979

updates/version.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@
3838
- Updated snippets parser (now using the same as OC 3.5), should be a bit faster and support some additional features
3939
2.2.1:
4040
- Support for basic HTML in snippet properties - Thanks @grwllrnc
41+
2.2.2:
42+
- Fix some cases where content between two snippets could be stripped

0 commit comments

Comments
 (0)