fix previous
This commit is contained in:
parent
a87bfdf687
commit
e672d60008
@ -121,9 +121,10 @@ function text2html($sz) {
|
|||||||
$splitInside = function($begin, $end, $sz) {
|
$splitInside = function($begin, $end, $sz) {
|
||||||
$parts = explode($begin, $sz);
|
$parts = explode($begin, $sz);
|
||||||
if (count($parts) == 1) return [$sz];
|
if (count($parts) == 1) return [$sz];
|
||||||
|
|
||||||
$ret = [$parts[0]];
|
$ret = [$parts[0]];
|
||||||
foreach($parts as $part) {
|
for($i = 1, $e = count($parts); $i !== $e; ++$i) {
|
||||||
$inner = explode($end, $part, 2);
|
$inner = explode($end, $parts[$i], 2);
|
||||||
$ret = array_merge($ret, $inner);
|
$ret = array_merge($ret, $inner);
|
||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
@ -138,8 +139,7 @@ function text2html($sz) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$htmlSections = $splitInside('<html>', '</html>', $sz);
|
$htmlSections = $splitInside('<html>', '</html>', $sz);
|
||||||
return $oddEven($htmlSections, $sectionFmt, $identity);
|
return $oddEven($htmlSections, $identity, $sectionFmt);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function array_decimate($array, $total, $partno) {
|
function array_decimate($array, $total, $partno) {
|
||||||
|
Reference in New Issue
Block a user