Index: trunk/extensions/Translate/tag/TPParse.php |
— | — | @@ -159,7 +159,7 @@ |
160 | 160 | |
161 | 161 | // Remove translation markup |
162 | 162 | $cb = array( __CLASS__, 'replaceTagCb' ); |
163 | | - $text = preg_replace_callback( '~(<translate>\n??)(.*)(\n??</translate>)~sU', $cb, $text ); |
| 163 | + $text = preg_replace_callback( '~(<translate>)(.*)(</translate>)~sU', $cb, $text ); |
164 | 164 | $text = TranslatablePage::unArmourNowiki( $nph, $text ); |
165 | 165 | |
166 | 166 | return $text; |
— | — | @@ -174,6 +174,6 @@ |
175 | 175 | } |
176 | 176 | |
177 | 177 | protected static function replaceTagCb( $matches ) { |
178 | | - return $matches[2]; |
| 178 | + return preg_replace( '~^\n|\n\z~', '', $matches[2] ); |
179 | 179 | } |
180 | 180 | } |