Renderer: fixed the regex that looks for h-tags in reverse_process_headings so it looks forthe new format #head: IDs.
authorDan
Tue, 30 Mar 2010 11:34:56 -0400
changeset 1230 31d226269d2f
parent 1228 9e9334417dbc
child 1231 4797a4a88533
Renderer: fixed the regex that looks for h-tags in reverse_process_headings so it looks forthe new format #head: IDs.
includes/render.php
--- a/includes/render.php	Mon Mar 29 01:47:31 2010 -0400
+++ b/includes/render.php	Tue Mar 30 11:34:56 2010 -0400
@@ -574,7 +574,7 @@
 	
 	public static function reverse_process_headings($text)
 	{
-		if ( !preg_match_all('|^<h([1-6])(?: id="toc[0-9]+")?>(.*?)</h\\1>$|m', $text, $matches) )
+		if ( !preg_match_all('|^<h([1-6])(?: id="head:[\w\.\/:;\(\)@\[\]=_-]+")?>(.*?)</h\\1>$|m', $text, $matches) )
 			return $text;
 		
 		foreach ( $matches[0] as $i => $match )