Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -3903,6 +3903,23 @@ |
3904 | 3904 | !!end |
3905 | 3905 | |
3906 | 3906 | !! test |
| 3907 | +Short headings with trailing space should match behaviour of Parser::doHeadings (bug 19910) |
| 3908 | +!! input |
| 3909 | +=== |
| 3910 | +The line above must have a trailing space! |
| 3911 | +=== <!-- |
| 3912 | +--> <!-- --> |
| 3913 | +But just in case it doesn't... |
| 3914 | +!! result |
| 3915 | +<h1><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: =">edit</a>]</span> <span class="mw-headline" id=".3D">=</span></h1> |
| 3916 | +<p>The line above must have a trailing space! |
| 3917 | +</p> |
| 3918 | +<h1><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =">edit</a>]</span> <span class="mw-headline" id=".3D_2">=</span></h1> |
| 3919 | +<p>But just in case it doesn't... |
| 3920 | +</p> |
| 3921 | +!! end |
| 3922 | + |
| 3923 | +!! test |
3907 | 3924 | BUG 1219 URL next to image (broken) |
3908 | 3925 | !! input |
3909 | 3926 | http://example.com[[Image:foobar.jpg]] |
— | — | @@ -5849,6 +5866,22 @@ |
5850 | 5867 | ==marked== |
5851 | 5868 | !!end |
5852 | 5869 | |
| 5870 | +# Test behaviour of bug 19910 |
| 5871 | +!! test |
| 5872 | +Sectiion with all-equals |
| 5873 | +!! options |
| 5874 | +section=2 |
| 5875 | +!! input |
| 5876 | +=== |
| 5877 | +The line above must have a trailing space |
| 5878 | +=== <!-- |
| 5879 | +--> <!-- --> |
| 5880 | +But just in case it doesn't... |
| 5881 | +!! result |
| 5882 | +=== <!-- |
| 5883 | +--> <!-- --> |
| 5884 | +But just in case it doesn't... |
| 5885 | +!! end |
5853 | 5886 | |
5854 | 5887 | !! test |
5855 | 5888 | Section replacement test (section 0) |
Index: trunk/phase3/includes/parser/Preprocessor_Hash.php |
— | — | @@ -428,7 +428,7 @@ |
429 | 429 | $count = $piece->count; |
430 | 430 | $equalsLength = strspn( $revText, '=', strlen( $text ) - $searchStart ); |
431 | 431 | if ( $equalsLength > 0 ) { |
432 | | - if ( $i - $equalsLength == $piece->startPos ) { |
| 432 | + if ( $searchStart - $equalsLength == $piece->startPos ) { |
433 | 433 | // This is just a single string of equals signs on its own line |
434 | 434 | // Replicate the doHeadings behaviour /={count}(.+)={count}/ |
435 | 435 | // First find out how many equals signs there really are (don't stop at 6) |
Index: trunk/phase3/includes/parser/Preprocessor_DOM.php |
— | — | @@ -467,7 +467,7 @@ |
468 | 468 | $count = $piece->count; |
469 | 469 | $equalsLength = strspn( $revText, '=', strlen( $text ) - $searchStart ); |
470 | 470 | if ( $equalsLength > 0 ) { |
471 | | - if ( $i - $equalsLength == $piece->startPos ) { |
| 471 | + if ( $searchStart - $equalsLength == $piece->startPos ) { |
472 | 472 | // This is just a single string of equals signs on its own line |
473 | 473 | // Replicate the doHeadings behaviour /={count}(.+)={count}/ |
474 | 474 | // First find out how many equals signs there really are (don't stop at 6) |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -236,6 +236,7 @@ |
237 | 237 | * (bug 24009) Include implicit groups in action=query&list=users&usprop=groups |
238 | 238 | * (bug 24016) API: Handle parameters specified in simple string syntax |
239 | 239 | ( 'paramname' => 'defaultval' ) correctly when outputting help |
| 240 | +* (bug 19910) Headings of the form ===+\s+ are now displayed as valid headings |
240 | 241 | |
241 | 242 | === Languages updated in 1.17 === |
242 | 243 | |