equal
deleted
inserted
replaced
572 return base64_encode($text); |
572 return base64_encode($text); |
573 } |
573 } |
574 |
574 |
575 public static function reverse_process_headings($text) |
575 public static function reverse_process_headings($text) |
576 { |
576 { |
577 if ( !preg_match_all('|^<h([1-6])(?: id="toc[0-9]+")?>(.*?)</h\\1>$|m', $text, $matches) ) |
577 if ( !preg_match_all('|^<h([1-6])(?: id="head:[\w\.\/:;\(\)@\[\]=_-]+")?>(.*?)</h\\1>$|m', $text, $matches) ) |
578 return $text; |
578 return $text; |
579 |
579 |
580 foreach ( $matches[0] as $i => $match ) |
580 foreach ( $matches[0] as $i => $match ) |
581 { |
581 { |
582 // generate heading tag |
582 // generate heading tag |