aboutsummaryrefslogtreecommitdiff
path: root/app/class/Modelrender.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/class/Modelrender.php')
-rw-r--r--app/class/Modelrender.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/class/Modelrender.php b/app/class/Modelrender.php
index 29a3fa7..1721e4e 100644
--- a/app/class/Modelrender.php
+++ b/app/class/Modelrender.php
@@ -437,17 +437,15 @@ class Modelrender extends Modelpage
$max = 6;
}
- $sum = [];
$text = preg_replace_callback(
'/<h([' . $min . '-' . $max . '])(\s+(\s*\w+="\w+")*)?\s*>(.+)<\/h[' . $min . '-' . $max . ']>/mU',
- function ($matches) use (&$sum) {
+ function ($matches) {
$cleanid = idclean($matches[4]);
- $sum[$cleanid][$matches[1]] = $matches[4];
+ $this->sum[] = new Header($cleanid, intval($matches[1]), $matches[4]);
return '<h' . $matches[1] . $matches[2] . ' id="' . $cleanid . '">' . $matches[4] . '</h' . $matches[1] . '>';
},
$text
);
- $this->sum[$element] = $sum;
return $text;
}