Index: trunk/extensions/UploadWizard/resources/mediawiki.language.parser.js |
— | — | @@ -372,7 +372,7 @@ |
373 | 373 | } |
374 | 374 | |
375 | 375 | var templateName = transform( |
376 | | - makeRegexParser( /^[A-Za-z]\w+/ ), |
| 376 | + makeRegexParser( /^[A-Za-z][\w ]+/ ), |
377 | 377 | function( result ) { return result.toString().toUpperCase(); } |
378 | 378 | ); |
379 | 379 | |
— | — | @@ -408,7 +408,9 @@ |
409 | 409 | templateWithReplacement, |
410 | 410 | nOrMore( 0, templateParam ) |
411 | 411 | ] ); |
412 | | - return res === null ? null : res[0].concat( res[1] ); |
| 412 | + var ret = res === null ? null : res[0].concat( res[1] ); |
| 413 | + console.log( "templateWithReplacement!", ret ); |
| 414 | + return ret; |
413 | 415 | }, |
414 | 416 | function() { |
415 | 417 | var res = sequence( [ |
— | — | @@ -418,7 +420,7 @@ |
419 | 421 | if ( res === null ) { |
420 | 422 | return null; |
421 | 423 | } |
422 | | - return res[1].length ? [ res[0], res[1] ] : [ res[0] ]; |
| 424 | + return [ res[0] ].concat( res[1] ); |
423 | 425 | } |
424 | 426 | ] ); |
425 | 427 | |