fix previous

This commit is contained in:
mappu 2014-06-17 18:21:51 +12:00
parent a87bfdf687
commit e672d60008
1 changed files with 4 additions and 4 deletions

View File

@ -121,9 +121,10 @@ function text2html($sz) {
$splitInside = function($begin, $end, $sz) {
$parts = explode($begin, $sz);
if (count($parts) == 1) return [$sz];
$ret = [$parts[0]];
foreach($parts as $part) {
$inner = explode($end, $part, 2);
for($i = 1, $e = count($parts); $i !== $e; ++$i) {
$inner = explode($end, $parts[$i], 2);
$ret = array_merge($ret, $inner);
}
return $ret;
@ -138,8 +139,7 @@ function text2html($sz) {
};
$htmlSections = $splitInside('<html>', '</html>', $sz);
return $oddEven($htmlSections, $sectionFmt, $identity);
return $oddEven($htmlSections, $identity, $sectionFmt);
}
function array_decimate($array, $total, $partno) {