Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.

Commit a607206

Browse files
committed
Separate literal blocks from their paragraph
1 parent a90cbbf commit a607206

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎admin/filters/includes.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ function before_filter_includes(string $data, string $folder): ?string {
2525
if (preg_match('/^(\s*)(?!\.\.\s)(.*)::\s*$/', $lines[$i], $literal) && literalBlockFollows($lines, $i, strlen($literal[1]))) {
2626
// Sphinx shows "text::" as "text:", "text ::" as "text", and drops a lone "::".
2727
if (trim($literal[2]) !== '') {
28-
array_push($result, $literal[1] . rtrim($literal[2]) . (str_ends_with($literal[2], ' ') ? '' : ':'), '');
28+
$result[] = $literal[1] . rtrim($literal[2]) . (str_ends_with($literal[2], ' ') ? '' : ':');
2929
}
3030

31+
$result[] = '';
32+
3133
$body = [];
3234

3335
while (isset($lines[$i + 1]) && (trim($lines[$i + 1]) === '' || indentWidth($lines[$i + 1]) > strlen($literal[1]))) {

0 commit comments

Comments
 (0)