Index: trunk/phase3/includes/Parser.php |
— | — | @@ -177,9 +177,9 @@ |
178 | 178 | $text = Parser::extractTags("pre", $text, $pre_content, $uniq_prefix); |
179 | 179 | foreach( $pre_content as $marker => $content ){ |
180 | 180 | if( $render ){ |
181 | | - $pre_content[$marker] = "<pre>" . wfEscapeHTMLTagsOnly( $content ) . "</pre>"; |
| 181 | + $pre_content[$marker] = "\n<pre>" . wfEscapeHTMLTagsOnly( $content ) . "</pre>"; |
182 | 182 | } else { |
183 | | - $pre_content[$marker] = "<pre>$content</pre>"; |
| 183 | + $pre_content[$marker] = "\n<pre>$content</pre>"; |
184 | 184 | } |
185 | 185 | } |
186 | 186 | |
— | — | @@ -1038,6 +1038,7 @@ |
1039 | 1039 | if ( ! $inBlockElem ) { |
1040 | 1040 | if ( " " == $t{0} ) { |
1041 | 1041 | $newSection = "pre"; |
| 1042 | + $text .= $this->closeParagraph(); |
1042 | 1043 | # $t = wfEscapeHTML( $t ); |
1043 | 1044 | } |
1044 | 1045 | else { $newSection = "p"; } |
— | — | @@ -1474,7 +1475,7 @@ |
1475 | 1476 | # strip out HTML |
1476 | 1477 | $canonized_headline = preg_replace( "/<.*?" . ">/","",$canonized_headline ); |
1477 | 1478 | $tocline = trim( $canonized_headline ); |
1478 | | - $canonized_headline = preg_replace("/[ &\\/<>\\(\\)\\[\\]=,+]+/", '_', html_entity_decode( $tocline)); |
| 1479 | + $canonized_headline = preg_replace("/[ &\\/<>\\(\\)\\[\\]=,+']+/", '_', html_entity_decode( $tocline)); |
1479 | 1480 | $refer[$headlineCount] = $canonized_headline; |
1480 | 1481 | |
1481 | 1482 | # count how many in assoc. array so we can track dupes in anchors |