Index: trunk/extensions/Validator/includes/parserHooks/Validator_ListErrors.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | ); |
31 | 31 | |
32 | 32 | /** |
33 | | - * No LST in pre-5.3 PHP *sigh*. |
| 33 | + * No LSB in pre-5.3 PHP *sigh*. |
34 | 34 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
35 | 35 | */ |
36 | 36 | public static function staticMagic( array &$magicWords, $langCode ) { |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | | - * No LST in pre-5.3 PHP *sigh*. |
| 43 | + * No LSB in pre-5.3 PHP *sigh*. |
44 | 44 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
45 | 45 | */ |
46 | 46 | public static function staticInit( Parser &$wgParser ) { |
Index: trunk/extensions/Validator/includes/parserHooks/Validator_Describe.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | class ValidatorDescribe extends ParserHook { |
17 | 17 | |
18 | 18 | /** |
19 | | - * No LST in pre-5.3 PHP *sigh*. |
| 19 | + * No LSB in pre-5.3 PHP *sigh*. |
20 | 20 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
21 | 21 | */ |
22 | 22 | public static function staticMagic( array &$magicWords, $langCode ) { |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
29 | | - * No LST in pre-5.3 PHP *sigh*. |
| 29 | + * No LSB in pre-5.3 PHP *sigh*. |
30 | 30 | * This is to be refactored as soon as php >=5.3 becomes acceptable. |
31 | 31 | */ |
32 | 32 | public static function staticInit( Parser &$wgParser ) { |
— | — | @@ -106,8 +106,7 @@ |
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | | - // This str_replace is a hack to allow for placing <pre>s into <pre>s, without breaking the outer ones. |
111 | | - return str_replace( 'pre!>', 'pre>', $this->parseWikitext( implode( "\n\n", $parts ) ) ); |
| 110 | + return $this->parseWikitext( implode( "\n\n", $parts ) ); |
112 | 111 | } |
113 | 112 | |
114 | 113 | /** |
— | — | @@ -229,7 +228,6 @@ |
230 | 229 | ( $pre ? '=== ' : '<h3>' ) . |
231 | 230 | wfMsg( 'validator-describe-syntax' ) . |
232 | 231 | ( $pre ? ' ===' : '</h3>' ); |
233 | | - $result .= "\n\n"; |
234 | 232 | |
235 | 233 | $params = array(); |
236 | 234 | $requiredParams = array(); |
— | — | @@ -245,56 +243,56 @@ |
246 | 244 | } |
247 | 245 | |
248 | 246 | if ( $parserHook->forTagExtensions ) { |
249 | | - $result .= "'''" . wfMsg( 'validator-describe-tagmin' ) . "'''\n\n"; |
| 247 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-tagmin' ) . "'''\n\n"; |
250 | 248 | |
251 | | - $result .= "<pre!><nowiki>\n" . Xml::element( |
| 249 | + $result .= "<pre><nowiki>\n" . Xml::element( |
252 | 250 | $hookName, |
253 | 251 | $requiredParams |
254 | | - ) . "</nowiki></pre!>"; |
| 252 | + ) . "\n</nowiki></pre>"; |
255 | 253 | |
256 | | - $result .= "'''" . wfMsg( 'validator-describe-tagmax' ) . "'''\n\n"; |
| 254 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-tagmax' ) . "'''\n\n"; |
257 | 255 | |
258 | 256 | // TODO: multiline when long |
259 | | - $result .= "<pre!><nowiki>\n" . Xml::element( |
| 257 | + $result .= "<pre><nowiki>\n" . Xml::element( |
260 | 258 | $hookName, |
261 | 259 | $params |
262 | | - ) . "</nowiki></pre!>"; |
| 260 | + ) . "\n</nowiki></pre>"; |
263 | 261 | |
264 | 262 | if ( count( $defaults ) > 0 ) { |
265 | | - $result .= "'''" . wfMsg( 'validator-describe-tagdefault' ) . "'''\n\n"; |
| 263 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-tagdefault' ) . "'''\n\n"; |
266 | 264 | |
267 | 265 | foreach ( $plainParams as $name => $type ) { |
268 | 266 | $contents = '{' . $name . ', ' . $type . '}'; |
269 | 267 | break; |
270 | 268 | } |
271 | 269 | |
272 | | - $result .= "<pre!><nowiki>\n" . Xml::element( |
| 270 | + $result .= "<pre><nowiki>\n" . Xml::element( |
273 | 271 | $hookName, |
274 | 272 | array_slice( $params, 1 ), |
275 | 273 | $contents |
276 | | - ) . "</nowiki></pre!>"; |
| 274 | + ) . "\n</nowiki></pre>"; |
277 | 275 | } |
278 | 276 | } |
279 | 277 | |
280 | 278 | if ( $parserHook->forParserFunctions ) { |
281 | | - $result .= "'''" . wfMsg( 'validator-describe-pfmin' ) . "'''\n\n"; |
| 279 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-pfmin' ) . "'''\n\n"; |
282 | 280 | |
283 | | - $result .= "<pre!><nowiki>\n" . |
| 281 | + $result .= "<pre><nowiki>\n" . |
284 | 282 | $this->buildParserFunctionSyntax( $hookName, $requiredParams ) |
285 | | - . "</nowiki></pre!>"; |
| 283 | + . "\n</nowiki></pre>"; |
286 | 284 | |
287 | | - $result .= "'''" . wfMsg( 'validator-describe-pfmax' ) . "'''\n\n"; |
| 285 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-pfmax' ) . "'''\n\n"; |
288 | 286 | |
289 | | - $result .= "<pre!><nowiki>\n" . |
| 287 | + $result .= "<pre><nowiki>\n" . |
290 | 288 | $this->buildParserFunctionSyntax( $hookName, $params ) |
291 | | - . "</nowiki></pre!>"; |
| 289 | + . "\n</nowiki></pre>"; |
292 | 290 | |
293 | 291 | if ( count( $defaults ) > 0 ) { |
294 | | - $result .= "'''" . wfMsg( 'validator-describe-pfdefault' ) . "'''\n\n"; |
| 292 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-pfdefault' ) . "'''\n\n"; |
295 | 293 | |
296 | | - $result .= "<pre!><nowiki>\n" . |
| 294 | + $result .= "<pre><nowiki>\n" . |
297 | 295 | $this->buildParserFunctionSyntax( $hookName, $plainParams, $defaults ) |
298 | | - . "</nowiki></pre!>"; |
| 296 | + . "\n</nowiki></pre>"; |
299 | 297 | } |
300 | 298 | } |
301 | 299 | |
Index: trunk/extensions/Validator/includes/ParserHook.php |
— | — | @@ -236,7 +236,7 @@ |
237 | 237 | $args = func_get_args(); |
238 | 238 | |
239 | 239 | $this->parser = array_shift( $args ); |
240 | | - |
| 240 | + |
241 | 241 | return array_merge( |
242 | 242 | array( $this->validateAndRender( $args, self::TYPE_FUNCTION ) ), |
243 | 243 | $this->getFunctionOptions() |