Code formatting

Wow.. This is very picky... |-(
pull/1320/head
Grischa Brockhaus 2022-11-25 02:21:03 +01:00
parent 537ee2e656
commit d584196215
1 changed files with 6 additions and 4 deletions

View File

@ -41,7 +41,9 @@ function fancybox_render(App $a, array &$b)
} }
$html = $b['html']; $html = $b['html'];
while (preg_match($pattern, $html, $matches, PREG_OFFSET_CAPTURE)) { while (preg_match($pattern, $html, $matches, PREG_OFFSET_CAPTURE)) {
if (is_array($matches)) $matches = $matches[0]; if (is_array($matches)) {
$matches = $matches[0];
}
$part = $matches[0]; $part = $matches[0];
$replaced = str_replace('<a href', '<a data-fancybox="' . $gallery . '" href', $part); $replaced = str_replace('<a href', '<a data-fancybox="' . $gallery . '" href', $part);
$replaced = str_replace('<div class="body-attach"', '<div class="body-attach done"', $replaced); $replaced = str_replace('<div class="body-attach"', '<div class="body-attach done"', $replaced);