Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -3147,13 +3147,15 @@ |
3148 | 3148 | ===Smaller headline=== |
3149 | 3149 | Blah blah |
3150 | 3150 | !! result |
3151 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2> |
| 3151 | +<a name="Headline_1"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline"> Headline 1 </span></h2> |
| 3152 | + |
3152 | 3153 | <p>Some text |
3153 | 3154 | </p> |
3154 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Headline 2">edit</a>]</div><a name="Headline_2"></a><h2>Headline 2</h2> |
| 3155 | +<a name="Headline_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline">Headline 2</span></h2> |
3155 | 3156 | <p>More |
3156 | 3157 | </p> |
3157 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Smaller headline">edit</a>]</div><a name="Smaller_headline"></a><h3>Smaller headline</h3> |
| 3158 | +<a name="Smaller_headline"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Smaller headline">edit</a>]</span> <span class="mw-headline">Smaller headline</span></h3> |
| 3159 | + |
3158 | 3160 | <p>Blah blah |
3159 | 3161 | </p> |
3160 | 3162 | !! end |
— | — | @@ -3172,7 +3174,8 @@ |
3173 | 3175 | Some text |
3174 | 3176 | ===Another headline=== |
3175 | 3177 | !! result |
3176 | | -<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div> |
| 3178 | +<table id="toc" class="toc" summary="Contents"><tbody><tr><td><div id="toctitle"><h2>Contents</h2> <span class="toctoggle">[<a href="javascript:toggleToc()" class="internal" id="togglelink">hide</a>]</span></div> |
| 3179 | + |
3177 | 3180 | <ul> |
3178 | 3181 | <li class="toclevel-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a> |
3179 | 3182 | <ul> |
— | — | @@ -3181,6 +3184,7 @@ |
3182 | 3185 | <li class="toclevel-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a> |
3183 | 3186 | <ul> |
3184 | 3187 | <li class="toclevel-4"><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li> |
| 3188 | + |
3185 | 3189 | </ul> |
3186 | 3190 | </li> |
3187 | 3191 | </ul> |
— | — | @@ -3192,17 +3196,19 @@ |
3193 | 3197 | <li class="toclevel-2"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li> |
3194 | 3198 | </ul> |
3195 | 3199 | </li> |
| 3200 | + |
3196 | 3201 | </ul> |
3197 | | -</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
3198 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</div><a name="Headline_1"></a><h2> Headline 1 </h2> |
3199 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Subheadline 1">edit</a>]</div><a name="Subheadline_1"></a><h3> Subheadline 1 </h3> |
3200 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Skipping a level">edit</a>]</div><a name="Skipping_a_level"></a><h5> Skipping a level </h5> |
3201 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=4" title="Edit section: Skipping a level">edit</a>]</div><a name="Skipping_a_level_2"></a><h6> Skipping a level </h6> |
3202 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=5" title="Edit section: Headline 2">edit</a>]</div><a name="Headline_2"></a><h2> Headline 2 </h2> |
| 3202 | +</td></tr></tbody></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
| 3203 | +<a name="Headline_1"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline"> Headline 1 </span></h2> |
| 3204 | +<a name="Subheadline_1"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Subheadline 1">edit</a>]</span> <span class="mw-headline"> Subheadline 1 </span></h3> |
| 3205 | + |
| 3206 | +<a name="Skipping_a_level"></a><h5><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline"> Skipping a level </span></h5> |
| 3207 | +<a name="Skipping_a_level_2"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=4" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline"> Skipping a level </span></h6> |
| 3208 | +<a name="Headline_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=5" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline"> Headline 2 </span></h2> |
| 3209 | + |
3203 | 3210 | <p>Some text |
3204 | 3211 | </p> |
3205 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=6" title="Edit section: Another headline">edit</a>]</div><a name="Another_headline"></a><h3>Another headline</h3> |
3206 | | - |
| 3212 | +<a name="Another_headline"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=6" title="Edit section: Another headline">edit</a>]</span> <span class="mw-headline">Another headline</span></h3> |
3207 | 3213 | !! end |
3208 | 3214 | |
3209 | 3215 | # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10' |
— | — | @@ -3220,7 +3226,8 @@ |
3221 | 3227 | ========= Level 9 Heading========= |
3222 | 3228 | ========== Level 10 Heading========== |
3223 | 3229 | !! result |
3224 | | -<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div> |
| 3230 | +<table id="toc" class="toc" summary="Contents"><tbody><tr><td><div id="toctitle"><h2>Contents</h2> <span class="toctoggle">[<a href="javascript:toggleToc()" class="internal" id="togglelink">hide</a>]</span></div> |
| 3231 | + |
3225 | 3232 | <ul> |
3226 | 3233 | <li class="toclevel-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a> |
3227 | 3234 | <ul> |
— | — | @@ -3229,12 +3236,14 @@ |
3230 | 3237 | <li class="toclevel-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a> |
3231 | 3238 | <ul> |
3232 | 3239 | <li class="toclevel-4"><a href="#Level_4_Heading"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Level 4 Heading</span></a> |
| 3240 | + |
3233 | 3241 | <ul> |
3234 | 3242 | <li class="toclevel-5"><a href="#Level_5_Heading"><span class="tocnumber">1.1.1.1.1</span> <span class="toctext">Level 5 Heading</span></a> |
3235 | 3243 | <ul> |
3236 | 3244 | <li class="toclevel-6"><a href="#Level_6_Heading"><span class="tocnumber">1.1.1.1.1.1</span> <span class="toctext">Level 6 Heading</span></a></li> |
3237 | 3245 | <li class="toclevel-6"><a href="#.3D_Level_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">= Level 7 Heading=</span></a></li> |
3238 | 3246 | <li class="toclevel-6"><a href="#.3D.3D_Level_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">== Level 8 Heading==</span></a></li> |
| 3247 | + |
3239 | 3248 | <li class="toclevel-6"><a href="#.3D.3D.3D_Level_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">=== Level 9 Heading===</span></a></li> |
3240 | 3249 | <li class="toclevel-6"><a href="#.3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.5</span> <span class="toctext">==== Level 10 Heading====</span></a></li> |
3241 | 3250 | </ul> |
— | — | @@ -3246,20 +3255,23 @@ |
3247 | 3256 | </ul> |
3248 | 3257 | </li> |
3249 | 3258 | </ul> |
| 3259 | + |
3250 | 3260 | </li> |
3251 | 3261 | </ul> |
3252 | | -</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
3253 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a>]</div><a name="Level_1_Heading"></a><h1> Level 1 Heading</h1> |
3254 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a>]</div><a name="Level_2_Heading"></a><h2> Level 2 Heading</h2> |
3255 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a>]</div><a name="Level_3_Heading"></a><h3> Level 3 Heading</h3> |
3256 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a>]</div><a name="Level_4_Heading"></a><h4> Level 4 Heading</h4> |
3257 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a>]</div><a name="Level_5_Heading"></a><h5> Level 5 Heading</h5> |
3258 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a>]</div><a name="Level_6_Heading"></a><h6> Level 6 Heading</h6> |
3259 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a>]</div><a name=".3D_Level_7_Heading.3D"></a><h6>= Level 7 Heading=</h6> |
3260 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a>]</div><a name=".3D.3D_Level_8_Heading.3D.3D"></a><h6>== Level 8 Heading==</h6> |
3261 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a>]</div><a name=".3D.3D.3D_Level_9_Heading.3D.3D.3D"></a><h6>=== Level 9 Heading===</h6> |
3262 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a>]</div><a name=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"></a><h6>==== Level 10 Heading====</h6> |
| 3262 | +</td></tr></tbody></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
| 3263 | +<a name="Level_1_Heading"></a><h1><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a>]</span> <span class="mw-headline"> Level 1 Heading</span></h1> |
| 3264 | +<a name="Level_2_Heading"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a>]</span> <span class="mw-headline"> Level 2 Heading</span></h2> |
3263 | 3265 | |
| 3266 | +<a name="Level_3_Heading"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a>]</span> <span class="mw-headline"> Level 3 Heading</span></h3> |
| 3267 | +<a name="Level_4_Heading"></a><h4><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a>]</span> <span class="mw-headline"> Level 4 Heading</span></h4> |
| 3268 | +<a name="Level_5_Heading"></a><h5><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a>]</span> <span class="mw-headline"> Level 5 Heading</span></h5> |
| 3269 | + |
| 3270 | +<a name="Level_6_Heading"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a>]</span> <span class="mw-headline"> Level 6 Heading</span></h6> |
| 3271 | +<a name=".3D_Level_7_Heading.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a>]</span> <span class="mw-headline">= Level 7 Heading=</span></h6> |
| 3272 | +<a name=".3D.3D_Level_8_Heading.3D.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a>]</span> <span class="mw-headline">== Level 8 Heading==</span></h6> |
| 3273 | + |
| 3274 | +<a name=".3D.3D.3D_Level_9_Heading.3D.3D.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a>]</span> <span class="mw-headline">=== Level 9 Heading===</span></h6> |
| 3275 | +<a name=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a>]</span> <span class="mw-headline">==== Level 10 Heading====</span></h6> |
3264 | 3276 | !! end |
3265 | 3277 | |
3266 | 3278 | !! test |
— | — | @@ -3270,9 +3282,9 @@ |
3271 | 3283 | == Foo bar == |
3272 | 3284 | == Foo bar == |
3273 | 3285 | !! result |
3274 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</div><a name="Foo_bar"></a><h2> Foo bar </h2> |
3275 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Foo bar">edit</a>]</div><a name="Foo_bar_2"></a><h2> Foo bar </h2> |
| 3286 | +<a name="Foo_bar"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline"> Foo bar </span></h2> |
3276 | 3287 | |
| 3288 | +<a name="Foo_bar_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline"> Foo bar </span></h2> |
3277 | 3289 | !! end |
3278 | 3290 | |
3279 | 3291 | !! article |
— | — | @@ -3292,11 +3304,12 @@ |
3293 | 3305 | {{sections}} |
3294 | 3306 | ==Section 4== |
3295 | 3307 | !! result |
3296 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Section 0">edit</a>]</div><a name="Section_0"></a><h2>Section 0</h2> |
3297 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Template:Sections&action=edit&section=1" title="Template:Sections">edit</a>]</div><a name="Section_1"></a><h3>Section 1</h3> |
3298 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Template:Sections&action=edit&section=2" title="Template:Sections">edit</a>]</div><a name="Section_2"></a><h2>Section 2</h2> |
3299 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Section 4">edit</a>]</div><a name="Section_4"></a><h2>Section 4</h2> |
| 3308 | +<a name="Section_0"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Section 0">edit</a>]</span> <span class="mw-headline">Section 0</span></h2> |
3300 | 3309 | |
| 3310 | +<a name="Section_1"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Template:Sections&action=edit&section=1" title="Template:Sections">edit</a>]</span> <span class="mw-headline">Section 1</span></h3> |
| 3311 | +<a name="Section_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Template:Sections&action=edit&section=2" title="Template:Sections">edit</a>]</span> <span class="mw-headline">Section 2</span></h2> |
| 3312 | +<a name="Section_4"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Section 4">edit</a>]</span> <span class="mw-headline">Section 4</span></h2> |
| 3313 | + |
3301 | 3314 | !! end |
3302 | 3315 | |
3303 | 3316 | !! test |
— | — | @@ -3306,9 +3319,9 @@ |
3307 | 3320 | ==Section 1== |
3308 | 3321 | ==Section 2== |
3309 | 3322 | !! result |
3310 | | -<a name="Section_1"></a><h2>Section 1</h2> |
3311 | | -<a name="Section_2"></a><h2>Section 2</h2> |
| 3323 | +<a name="Section_1"></a><h2> <span class="mw-headline">Section 1</span></h2> |
3312 | 3324 | |
| 3325 | +<a name="Section_2"></a><h2> <span class="mw-headline">Section 2</span></h2> |
3313 | 3326 | !! end |
3314 | 3327 | |
3315 | 3328 | !! test |
— | — | @@ -3318,8 +3331,7 @@ |
3319 | 3332 | !! input |
3320 | 3333 | ==Section with a [[Main Page|link]] in it== |
3321 | 3334 | !! result |
3322 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Section with a link in it">edit</a>]</div><a name="Section_with_a_link_in_it"></a><h2>Section with a <a href="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">link</a> in it</h2> |
3323 | | - |
| 3335 | +<a name="Section_with_a_link_in_it"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Section with a link in it">edit</a>]</span> <span class="mw-headline">Section with a <a href="https://www.mediawiki.org/phase3/index.php/Main_Page" title="Main Page">link</a> in it</span></h2> |
3324 | 3336 | !! end |
3325 | 3337 | |
3326 | 3338 | |
— | — | @@ -4459,12 +4471,13 @@ |
4460 | 4472 | == onmouseover= == |
4461 | 4473 | http://__TOC__ |
4462 | 4474 | !! result |
4463 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a>]</div><a name="onmouseover.3D"></a><h2> onmouseover= </h2> |
4464 | | -http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div> |
| 4475 | +<a name="onmouseover.3D"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: onmouseover=">edit</a>]</span> <span class="mw-headline"> onmouseover= </span></h2> |
| 4476 | +http://<table id="toc" class="toc" summary="Contents"><tbody><tr><td><div id="toctitle"><h2>Contents</h2> <span class="toctoggle">[<a href="javascript:toggleToc()" class="internal" id="togglelink">hide</a>]</span></div> |
4465 | 4477 | <ul> |
4466 | 4478 | <li class="toclevel-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li> |
| 4479 | + |
4467 | 4480 | </ul> |
4468 | | -</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
| 4481 | +</td></tr></tbody></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
4469 | 4482 | |
4470 | 4483 | !! end |
4471 | 4484 | |
— | — | @@ -4474,11 +4487,10 @@ |
4475 | 4488 | ==a== |
4476 | 4489 | {| STYLE=__TOC__ |
4477 | 4490 | !! result |
4478 | | -<div class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a>]</div><a name="a"></a><h2>a</h2> |
4479 | | -<table style="__TOC__"> |
4480 | | -<tr><td></td></tr> |
4481 | | -</table> |
4482 | | - |
| 4491 | +<a name="a"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: a">edit</a>]</span> <span class="mw-headline">a</span></h2> |
| 4492 | +<table style=""> |
| 4493 | +<tbody><tr><td></td></tr> |
| 4494 | +</tbody></table> |
4483 | 4495 | !! end |
4484 | 4496 | |
4485 | 4497 | # Known to produce bogus xml (extra </td>) |
— | — | @@ -5861,4 +5873,4 @@ |
5862 | 5874 | math |
5863 | 5875 | character entities |
5864 | 5876 | and much more |
5865 | | -Try for 100% code coverage |
| 5877 | +Try for 100% code coverage |
\ No newline at end of file |
Index: trunk/phase3/skins/chick/main.css |
— | — | @@ -50,20 +50,26 @@ |
51 | 51 | padding-bottom: 0.17em; |
52 | 52 | border-bottom: 1px solid #aaaaaa; |
53 | 53 | } |
| 54 | +.editsection { |
| 55 | + font-weight: normal; |
| 56 | + float: right; |
| 57 | + margin-left: 5px; |
| 58 | +} |
54 | 59 | h1 { font-size: 188%; } |
| 60 | +h1 .editsection { font-size: 53.2%; } |
55 | 61 | h2 { font-size: 150%; } |
| 62 | +h2 .editsection { font-size: 66.7%; } |
56 | 63 | h3, h4, h5, h6 { |
57 | 64 | border-bottom: none; |
58 | 65 | font-weight: bold; |
59 | 66 | } |
60 | 67 | h3 { font-size: 132%; } |
| 68 | +h3 .editsection { font-size: 75.8%; } |
61 | 69 | h4 { font-size: 116%; } |
| 70 | +h4 .editsection { font-size: 86.2%; } |
62 | 71 | h5 { font-size: 100%; } |
63 | 72 | h6 { font-size: 80%; } |
64 | | -.editsection { |
65 | | - float: right; |
66 | | - margin-left: 5px; |
67 | | -} |
| 73 | +h6 .editsection { font-size: 125%; } |
68 | 74 | |
69 | 75 | ul { |
70 | 76 | line-height: 1.5em; |
— | — | @@ -482,4 +488,4 @@ |
483 | 489 | |
484 | 490 | #jump-to-nav { |
485 | 491 | display: none; |
486 | | -} |
\ No newline at end of file |
| 492 | +} |
Index: trunk/phase3/skins/monobook/rtl.css |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | float: right; |
43 | 43 | clear: right; |
44 | 44 | } |
45 | | -div.editsection { |
| 45 | +.editsection { |
46 | 46 | float: left; |
47 | 47 | margin-right: 5px; |
48 | 48 | } |
Index: trunk/phase3/skins/monobook/main.css |
— | — | @@ -119,17 +119,23 @@ |
120 | 120 | border-bottom: 1px solid #aaa; |
121 | 121 | } |
122 | 122 | h1 { font-size: 188%; } |
| 123 | +h1 .editsection { font-size: 53%; } |
123 | 124 | h2 { font-size: 150%; } |
| 125 | +h2 .editsection { font-size: 67%; } |
124 | 126 | h3, h4, h5, h6 { |
125 | 127 | border-bottom: none; |
126 | 128 | font-weight: bold; |
127 | 129 | } |
128 | 130 | h3 { font-size: 132%; } |
| 131 | +h3 .editsection { font-size: 76%; font-weight: normal; } |
129 | 132 | h4 { font-size: 116%; } |
| 133 | +h4 .editsection { font-size: 86%; font-weight: normal; } |
130 | 134 | h5 { font-size: 100%; } |
| 135 | +h5 .editsection { font-weight: normal; } |
131 | 136 | h6 { font-size: 80%; } |
| 137 | +h6 .editsection { font-size: 125%; font-weight: normal; } |
132 | 138 | |
133 | | -div.editsection { |
| 139 | +.editsection { |
134 | 140 | float: right; |
135 | 141 | margin-left: 5px; |
136 | 142 | } |
Index: trunk/phase3/skins/common/common.css |
— | — | @@ -2,6 +2,31 @@ |
3 | 3 | * common.css |
4 | 4 | * This file contains CSS settings common to Wikistandard, Nostalgia and CologneBlue |
5 | 5 | */ |
| 6 | + |
| 7 | +/* For clarity, explicitly state some recommendations from <http://www.w3.org/ |
| 8 | + TR/CSS21/sample.html> to make sure the editsection links scale right */ |
| 9 | + |
| 10 | +h1 { font-size: 2em; } |
| 11 | +h2 { font-size: 1.5em; } |
| 12 | +h3 { font-size: 1.17em; } |
| 13 | +h5 { font-size: .83em; } |
| 14 | +h6 { font-size: .75em; } |
| 15 | +h1, h2, h3, h4, h5, h6 { font-weight: bolder } |
| 16 | + |
| 17 | +/* Now the custom parts */ |
| 18 | + |
| 19 | +/* Make edit sections (which are inside h# tags) normal-sized */ |
| 20 | +.editsection { |
| 21 | + font-weight: normal; |
| 22 | + float: right; |
| 23 | + margin-left: 5px; |
| 24 | +} |
| 25 | +h1 .editsection { font-size: 50% } |
| 26 | +h2 .editsection { font-size: 66.7% } |
| 27 | +h3 .editsection { font-size: 85.5% } |
| 28 | +h5 .editsection { font-size: 120% } |
| 29 | +h6 .editsection { font-size: 133% } |
| 30 | + |
6 | 31 | #footer { clear: both } |
7 | 32 | /* images */ |
8 | 33 | div.floatright { float: right; clear: right; margin: 0 0 1em 1em; } |
— | — | @@ -315,11 +340,6 @@ |
316 | 341 | font-style: italic; |
317 | 342 | } |
318 | 343 | |
319 | | -div.editsection { |
320 | | - float: right; |
321 | | - margin-left: 5px; |
322 | | -} |
323 | | - |
324 | 344 | /* Classes for EXIF data display */ |
325 | 345 | table.mw_metadata { |
326 | 346 | margin-left: 0.5em; |
Index: trunk/phase3/skins/common/cologneblue.css |
— | — | @@ -78,8 +78,9 @@ |
79 | 79 | h1 { |
80 | 80 | color: #666666; |
81 | 81 | font-family: Verdana, Arial, sans-serif; |
82 | | - font-size: 18pt; font-weight: bold; line-height: 21pt; |
| 82 | + font-size: 180%; line-height: 21pt; |
83 | 83 | } |
| 84 | +h1 .editsection { font-size: 55.6%; } |
84 | 85 | h1.pagetitle { padding-bottom: 0; margin-bottom: 0; } |
85 | 86 | #article p.subtitle { |
86 | 87 | color: #666666; font-size: 11pt; font-weight: bold; |
Index: trunk/phase3/skins/common/commonPrint.css |
— | — | @@ -132,8 +132,11 @@ |
133 | 133 | |
134 | 134 | h1, h2, h3, h4, h5, h6 |
135 | 135 | { |
136 | | - font-weight: bold; |
| 136 | + font-weight: bold; |
137 | 137 | } |
| 138 | +.editsection { |
| 139 | + font-weight: normal; |
| 140 | +} |
138 | 141 | |
139 | 142 | p, .documentDescription { |
140 | 143 | margin: 1em 0 ! important; |
Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -503,9 +503,9 @@ |
504 | 504 | |
505 | 505 | function setupRightClickEdit() { |
506 | 506 | if (document.getElementsByTagName) { |
507 | | - var divs = document.getElementsByTagName('div'); |
508 | | - for (var i = 0; i < divs.length; i++) { |
509 | | - var el = divs[i]; |
| 507 | + var spans = document.getElementsByTagName('span'); |
| 508 | + for (var i = 0; i < spans.length; i++) { |
| 509 | + var el = spans[i]; |
510 | 510 | if(el.className == 'editsection') { |
511 | 511 | addRightClickEditHandler(el); |
512 | 512 | } |
— | — | @@ -518,27 +518,56 @@ |
519 | 519 | var link = el.childNodes[i]; |
520 | 520 | if (link.nodeType == 1 && link.nodeName.toLowerCase() == 'a') { |
521 | 521 | var editHref = link.getAttribute('href'); |
| 522 | + // find the enclosing (parent) header |
| 523 | + var prev = el.parentNode; |
| 524 | + if (prev && prev.nodeType == 1 && |
| 525 | + prev.nodeName.match(/^[Hh][1-6]$/)) { |
| 526 | + prev.oncontextmenu = function(e) { |
| 527 | + if (!e) var e = window.event; |
| 528 | + // e is now the event in all browsers |
| 529 | + if (e.target) var targ = e.target; |
| 530 | + else if (e.srcElement) var targ = e.srcElement; |
| 531 | + if (targ.nodeType == 3) // defeat Safari bug |
| 532 | + targ = targ.parentNode; |
| 533 | + // targ is now the target element |
522 | 534 | |
523 | | - // find the following a |
524 | | - var next = el.nextSibling; |
525 | | - while (next.nodeType != 1) |
526 | | - next = next.nextSibling; |
527 | | - |
528 | | - // find the following header |
529 | | - next = next.nextSibling; |
530 | | - while (next.nodeType != 1) |
531 | | - next = next.nextSibling; |
532 | | - |
533 | | - if (next && next.nodeType == 1 && |
534 | | - next.nodeName.match(/^[Hh][1-6]$/)) { |
535 | | - next.oncontextmenu = function() { |
536 | | - document.location = editHref; |
537 | | - return false; |
| 535 | + // We don't want to deprive the noble reader of a context menu |
| 536 | + // for the section edit link, do we? (Might want to extend this |
| 537 | + // to all <a>'s?) |
| 538 | + if (targ.nodeName.toLowerCase() != 'a' |
| 539 | + || targ.parentNode.className != 'editsection') { |
| 540 | + document.location = editHref; |
| 541 | + return false; |
| 542 | + } |
538 | 543 | } |
539 | 544 | } |
540 | 545 | } |
541 | 546 | } |
542 | 547 | } |
| 548 | +/* |
| 549 | +function addRightClickEditHandler(el) { |
| 550 | + // find the enclosing (parent) header |
| 551 | + var par = el.parentNode; |
| 552 | + if (par && par.nodeType == 1 && par.nodeName.match(/^[Hh][1-6]$/)) { |
| 553 | + par.oncontextmenu = function(e) { |
| 554 | + if (!e) var e = window.event; |
| 555 | + // e is now the event in all browsers |
| 556 | + if (e.target) targ = e.target; |
| 557 | + else if (e.srcElement) targ = e.srcElement; |
| 558 | + if (targ.nodeType == 3) // defeat Safari bug |
| 559 | + targ = targ.parentNode; |
| 560 | + // targ is now the target element |
| 561 | + // We don't want to deprive the noble reader of a context menu |
| 562 | + // for the section edit link, do we? (Might want to extend this |
| 563 | + // to all <a>'s.)links |
| 564 | + if (targ.className != 'editsection') { |
| 565 | + document.location = editHref; |
| 566 | + return false; |
| 567 | + } |
| 568 | + } |
| 569 | + } |
| 570 | +} |
| 571 | +*/ |
543 | 572 | |
544 | 573 | function setupCheckboxShiftClick() { |
545 | 574 | if (document.getElementsByTagName) { |
Index: trunk/phase3/skins/common/common_rtl.css |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | margin-right: 1.4em; |
18 | 18 | margin-left: 0.4em; |
19 | 19 | } |
20 | | -div.editsection { |
| 20 | +.editsection { |
21 | 21 | float: left; |
22 | 22 | margin-right: 5px; |
23 | 23 | } |
Index: trunk/phase3/skins/common/wikistandard.css |
— | — | @@ -29,16 +29,18 @@ |
30 | 30 | |
31 | 31 | h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; |
32 | 32 | font-size:150%; } |
| 33 | +h1.pagetitle .editsection { font-size: 66.7%; } |
33 | 34 | h2 { font-size: 120%; } |
| 35 | +h2 .editsection { font-size: 83.3%; } |
34 | 36 | h2, h3, h4, h5, h6 { margin-bottom: 0;} |
35 | 37 | h3 { font-size: 106.25%; } |
| 38 | +h3 .editsection { font-size: 94.1%; } |
36 | 39 | h4 { font-size: 103.125%; } |
| 40 | +h4 .editsection { font-size: 97.0%; } |
37 | 41 | h5 { font-size: 100%; } |
| 42 | +h5 .editsection { font-size: 100%; } |
38 | 43 | h6 { font-size: 95%; } |
39 | | -.editsection { |
40 | | - float: right; |
41 | | - margin-left: 5px; |
42 | | -} |
| 44 | +h6 .editsection { font-size: 105.3%; } |
43 | 45 | hr.sep { color:gray;height:1px;background-color:gray;} |
44 | 46 | p.subpages { font-size:small;} |
45 | 47 | p.subtitle { padding-top: 0; margin-top: 0;} |
Index: trunk/phase3/skins/simple/main.css |
— | — | @@ -1,3 +1,29 @@ |
| 2 | +/* For clarity, explicitly state some recommendations from <http://www.w3.org/ |
| 3 | + TR/CSS21/sample.html> to make sure the editsection links scale right */ |
| 4 | + |
| 5 | +h1 { font-size: 2em; } |
| 6 | +h2 { font-size: 1.5em; } |
| 7 | +h3 { font-size: 1.17em; } |
| 8 | +h5 { font-size: .83em; } |
| 9 | +h6 { font-size: .75em; } |
| 10 | +h1, h2, h3, h4, h5, h6 { font-weight: bolder } |
| 11 | + |
| 12 | +/* Now the custom parts */ |
| 13 | + |
| 14 | +/* Make edit sections (which are inside h# tags) normal-sized |
| 15 | + and otherwise format */ |
| 16 | +.editsection { |
| 17 | + font-weight: normal; |
| 18 | + float: right; |
| 19 | + margin-left: 5px; |
| 20 | +} |
| 21 | +h1 .editsection { font-size: 50% } |
| 22 | +h2 .editsection { font-size: 66.7% } |
| 23 | +h3 .editsection { font-size: 85.5% } |
| 24 | +h5 .editsection { font-size: 120% } |
| 25 | +h6 .editsection { font-size: 133% } |
| 26 | + |
| 27 | + |
2 | 28 | #toolbar { |
3 | 29 | display: none; |
4 | 30 | } |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -1046,11 +1046,11 @@ |
1047 | 1047 | $editurl = '§ion='.$section; |
1048 | 1048 | $url = $this->makeKnownLinkObj( $title, wfMsg('editsection'), 'action=edit'.$editurl ); |
1049 | 1049 | |
1050 | | - return "<div class=\"editsection\">[".$url."]</div>"; |
| 1050 | + return "<span class=\"editsection\">[".$url."]</span>"; |
1051 | 1051 | |
1052 | 1052 | } |
1053 | 1053 | |
1054 | | - /** |
| 1054 | + /** |
1055 | 1055 | * @param $title Title object. |
1056 | 1056 | * @param $section Integer: section number. |
1057 | 1057 | * @param $hint Link String: title, or default if omitted or empty |
— | — | @@ -1062,7 +1062,7 @@ |
1063 | 1063 | $hint = ( $hint=='' ) ? '' : ' title="' . wfMsgHtml( 'editsectionhint', htmlspecialchars( $hint ) ) . '"'; |
1064 | 1064 | $url = $this->makeKnownLinkObj( $nt, wfMsg('editsection'), 'action=edit'.$editurl, '', '', '', $hint ); |
1065 | 1065 | |
1066 | | - return "<div class=\"editsection\">[".$url."]</div>"; |
| 1066 | + return "<span class=\"editsection\">[".$url."]</span>"; |
1067 | 1067 | } |
1068 | 1068 | |
1069 | 1069 | /** |
Index: trunk/phase3/includes/Parser.php |
— | — | @@ -3516,6 +3516,9 @@ |
3517 | 3517 | if( $enoughToc && ( !isset($wgMaxTocLevel) || $toclevel<$wgMaxTocLevel ) ) { |
3518 | 3518 | $toc .= $sk->tocLine($anchor, $tocline, $numbering, $toclevel); |
3519 | 3519 | } |
| 3520 | + # give headline the correct <h#> tag |
| 3521 | + @$head[$headlineCount] .= "<a name=\"$anchor\"></a><h".$level.$matches[2][$headlineCount]; |
| 3522 | + |
3520 | 3523 | if( $showEditLink && ( !$istemplate || $templatetitle !== "" ) ) { |
3521 | 3524 | if ( empty( $head[$headlineCount] ) ) { |
3522 | 3525 | $head[$headlineCount] = ''; |
— | — | @@ -3525,10 +3528,12 @@ |
3526 | 3529 | else |
3527 | 3530 | $head[$headlineCount] .= $sk->editSectionLink($this->mTitle, $sectionCount+1, $headline_hint); |
3528 | 3531 | } |
| 3532 | + // Yes, the headline logically goes before the edit section. Why isn't it there |
| 3533 | + // in source? Ask the CSS people. The float gets screwed up if you do that. |
| 3534 | + // This might be moved to before the editsection at some point so that it will |
| 3535 | + // display a bit more prettily without CSS, so please don't rely on the order. |
| 3536 | + $head[$headlineCount] .= ' <span class="mw-headline">'.$headline.'</span></h'.$level.'>'; |
3529 | 3537 | |
3530 | | - # give headline the correct <h#> tag |
3531 | | - @$head[$headlineCount] .= "<a name=\"$anchor\"></a><h".$level.$matches[2][$headlineCount] .$headline.'</h'.$level.'>'; |
3532 | | - |
3533 | 3538 | $headlineCount++; |
3534 | 3539 | if( !$istemplate ) |
3535 | 3540 | $sectionCount++; |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1030,7 +1030,7 @@ |
1031 | 1031 | * to ensure that client-side caches don't keep obsolete copies of global |
1032 | 1032 | * styles. |
1033 | 1033 | */ |
1034 | | -$wgStyleVersion = '14'; |
| 1034 | +$wgStyleVersion = '15'; |
1035 | 1035 | |
1036 | 1036 | # Server-side caching: |
1037 | 1037 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -55,6 +55,8 @@ |
56 | 56 | * (bug 7581) Update language name for cbk-zam |
57 | 57 | * (bug 7444) Update namespace translations for Telugu (te), kept old values as |
58 | 58 | alias for compatibility |
| 59 | +* (bug 4525) Move section links down visually to same level as headings |
| 60 | + editsection links are now inside the heading elements) |
59 | 61 | |
60 | 62 | |
61 | 63 | == Languages updated == |