From a33c5fffec2b25e9f6a2a687693c513ea2897115 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 28 Jul 2011 21:41:41 +0000 Subject: [PATCH] Revert r93386 -- PLEASE STOP COMMITTING THESE THINGS WITHOUT CONFIRMING THAT THEY DO WHAT NEEDS TO BE DONE, THAT THEY DON'T CAUSE PROBLEMS, AND THAT THEY WON'T JUST GET REVERTED FOR THE FOURTH OR FIFTH TIME. THANK YOU. --- RELEASE-NOTES-1.19 | 1 - includes/Linker.php | 2 +- skins/common/shared.css | 4 + skins/vector/screen.css | 1 + tests/parser/parserTests.txt | 150 +++++++++++++++++------------------ 5 files changed, 81 insertions(+), 77 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 3b810cd0fb..c2f47fcb59 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -29,7 +29,6 @@ production. until the second was introduced in 1.17. * (bug 25355) Parser generates edit section links for special pages * (bug 13766) Change table of content syntax to be semantically correct -* (bug 11270 & bug 11555) Make editsection link more understandable by positioning it next to the header. === API changes in 1.19 === * (bug 19838) siprop=interwikimap can now use the interwiki cache. diff --git a/includes/Linker.php b/includes/Linker.php index bb2a0148bc..525a6fad5a 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1507,8 +1507,8 @@ class Linker { */ public static function makeHeadline( $level, $attribs, $anchor, $text, $link, $legacyAnchor = false ) { $ret = "$text " . $link + . " $text" . ""; if ( $legacyAnchor !== false ) { $ret = "
$ret"; diff --git a/skins/common/shared.css b/skins/common/shared.css index 4a69f8bfec..73ac775126 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -84,9 +84,13 @@ div#mw-js-message { /* Edit section links */ .editsection { + float: right; margin-left: 5px; unicode-bidi: embed; } +/* Correct directionality when page dir is different from site/user dir */ +/* @noflip */.mw-content-ltr .editsection, .mw-content-rtl .mw-content-ltr .editsection { float: right; } +/* @noflip */.mw-content-rtl .editsection, .mw-content-ltr .mw-content-rtl .editsection { float: left; } /** * File histories */ diff --git a/skins/vector/screen.css b/skins/vector/screen.css index 70c23eee4a..ba604b42de 100644 --- a/skins/vector/screen.css +++ b/skins/vector/screen.css @@ -762,6 +762,7 @@ h5 { font-size: 100%; } h5 .editsection { font-weight: normal; } h6 { font-size: 80%; } h6 .editsection { font-size: 125%; font-weight: normal; } +.editsection { float: right; } p { margin: .4em 0 .5em 0; line-height: 1.5em; diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index fe8c625b12..c4a0015a99 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1813,7 +1813,7 @@ Heading inside table (affected by r85922)
-

Heading [edit]

+

[edit] Heading

@@ -3491,8 +3491,8 @@ Bug 6563: Edit link generation for section shown by !! input {{includeonly section}} !! result -

Includeonly section [edit]

-

Section T-1 [edit]

+

[edit] Includeonly section

+

[edit] Section T-1

!! end @@ -3518,7 +3518,7 @@ Bug 6563: Edit link generation for section suppressed by ==Section 1== !! result -

Section 1 [edit]

+

[edit] Section 1

!! end @@ -4537,13 +4537,13 @@ More ===Smaller headline=== Blah blah !! result -

Headline 1 [edit]

+

[edit] Headline 1

Some text

-

Headline 2 [edit]

+

[edit] Headline 2

More

-

Smaller headline [edit]

+

[edit] Smaller headline

Blah blah

!! end @@ -4582,14 +4582,14 @@ Some text -

Headline 1 [edit]

-

Subheadline 1 [edit]

-
Skipping a level [edit]
-
Skipping a level [edit]
-

Headline 2 [edit]

+

[edit] Headline 1

+

[edit] Subheadline 1

+
[edit] Skipping a level
+
[edit] Skipping a level
+

[edit] Headline 2

Some text

-

Another headline [edit]

+

[edit] Another headline

!! end @@ -4637,16 +4637,16 @@ Handling of sections up to level 6 and beyond -

Level 1 Heading [edit]

-

Level 2 Heading [edit]

-

Level 3 Heading [edit]

-

Level 4 Heading [edit]

-
Level 5 Heading [edit]
-
Level 6 Heading [edit]
-
= Level 7 Heading= [edit]
-
== Level 8 Heading== [edit]
-
=== Level 9 Heading=== [edit]
-
==== Level 10 Heading==== [edit]
+

[edit] Level 1 Heading

+

[edit] Level 2 Heading

+

[edit] Level 3 Heading

+

[edit] Level 4 Heading

+
[edit] Level 5 Heading
+
[edit] Level 6 Heading
+
[edit] = Level 7 Heading=
+
[edit] == Level 8 Heading==
+
[edit] === Level 9 Heading===
+
[edit] ==== Level 10 Heading====
!! end @@ -4679,12 +4679,12 @@ TOC regression (bug 9764) -

title 1 [edit]

-

title 1.1 [edit]

-

title 1.1.1 [edit]

-

title 1.2 [edit]

-

title 2 [edit]

-

title 2.1 [edit]

+

[edit] title 1

+

[edit] title 1.1

+

[edit] title 1.1.1

+

[edit] title 1.2

+

[edit] title 2

+

[edit] title 2.1

!! end @@ -4715,12 +4715,12 @@ wgMaxTocLevel=3 -

title 1 [edit]

-

title 1.1 [edit]

-

title 1.1.1 [edit]

-

title 1.2 [edit]

-

title 2 [edit]

-

title 2.1 [edit]

+

[edit] title 1

+

[edit] title 1.1

+

[edit] title 1.1.1

+

[edit] title 1.2

+

[edit] title 2

+

[edit] title 2.1

!! end @@ -4745,11 +4745,11 @@ wgMaxTocLevel=3
  • 2 Section 2
  • -

    Section 1 [edit]

    -

    Section 1.1 [edit]

    -

    Section 1.1.1 [edit]

    -

    Section 1.1.1.1 [edit]

    -

    Section 2 [edit]

    +

    [edit] Section 1

    +

    [edit] Section 1.1

    +

    [edit] Section 1.1.1

    +

    [edit] Section 1.1.1.1

    +

    [edit] Section 2

    !! end @@ -4760,8 +4760,8 @@ Resolving duplicate section names == Foo bar == == Foo bar == !! result -

    Foo bar [edit]

    -

    Foo bar [edit]

    +

    [edit] Foo bar

    +

    [edit] Foo bar

    !! end @@ -4771,8 +4771,8 @@ Resolving duplicate section names with differing case (bug 10721) == Foo bar == == Foo Bar == !! result -

    Foo bar [edit]

    -

    Foo Bar [edit]

    +

    [edit] Foo bar

    +

    [edit] Foo Bar

    !! end @@ -4791,10 +4791,10 @@ __NOTOC__ {{sections}} ==Section 4== !! result -

    Section 0 [edit]

    -

    Section 1 [edit]

    -

    Section 2 [edit]

    -

    Section 4 [edit]

    +

    [edit] Section 0

    +

    [edit] Section 1

    +

    [edit] Section 2

    +

    [edit] Section 4

    !! end @@ -4805,8 +4805,8 @@ __NOEDITSECTION__ ==Section 1== ==Section 2== !! result -

    Section 1

    -

    Section 2

    +

    Section 1

    +

    Section 2

    !! end @@ -4815,7 +4815,7 @@ Link inside a section heading !! input ==Section with a [[Main Page|link]] in it== !! result -

    Section with a link in it [edit]

    +

    [edit] Section with a link in it

    !! end @@ -4837,9 +4837,9 @@ __TOC__
  • 2 title 2
  • -

    title 1 [edit]

    -

    title 1.1 [edit]

    -

    title 2 [edit]

    +

    [edit] title 1

    +

    [edit] title 1.1

    +

    [edit] title 2

    !! end @@ -4861,10 +4861,10 @@ The line above must have a trailing space! --> But just in case it doesn't... !! result -

    = [edit]

    +

    [edit] =

    The line above must have a trailing space!

    -

    = [edit]

    +

    [edit] =

    But just in case it doesn't...

    !! end @@ -4900,19 +4900,19 @@ section 5
  • 5 text " text
  • -

    text > text [edit]

    +

    [edit] text > text

    section 1

    -

    text < text [edit]

    +

    [edit] text < text

    section 2

    -

    text & text [edit]

    +

    [edit] text & text

    section 3

    -

    text ' text [edit]

    +

    [edit] text ' text

    section 4

    -

    text " text [edit]

    +

    [edit] text " text

    section 5

    !! end @@ -6118,7 +6118,7 @@ Fuzz testing: Parser14 == onmouseover= == http://__TOC__ !! result -

    onmouseover= [edit]

    +

    [edit] onmouseover=

    http://

    Contents

    • 1 onmouseover=
    • @@ -6134,7 +6134,7 @@ Fuzz testing: Parser14-table {| STYLE=__TOC__ |foo !! result -

      a [edit]

      +

      [edit] a

      foo @@ -7938,7 +7938,7 @@ Inclusion of !userCanEdit() content !! input {{MediaWiki:Fake}} !! result -

      header [edit]

      +

      [edit] header

      !! end @@ -7969,12 +7969,12 @@ Out-of-order TOC heading levels -

      2 [edit]

      -
      6 [edit]
      -

      3 [edit]

      -

      1 [edit]

      -
      5 [edit]
      -

      2 [edit]

      +

      [edit] 2

      +
      [edit] 6
      +

      [edit] 3

      +

      [edit] 1

      +
      [edit] 5
      +

      [edit] 2

      !! end @@ -8081,7 +8081,7 @@ anchorencode encodes like the TOC generator: (bug 18431) {{anchorencode: _ +:.3A%3A&&]] }} __NOEDITSECTION__ !! result -

      _ +:.3A%3A&&]]

      +

      _ +:.3A%3A&&]]

      .2B:.3A.253A.26.26.5D.5D

      !! end @@ -8272,7 +8272,7 @@ language=sr variant=sr-ec !! input == -{Naslov}- == !! result -

      Naslov [уреди]

      +

      [уреди] Naslov

      !! end @@ -8520,7 +8520,7 @@ Morwen/13: Unclosed link followed by heading !! result

      [[link

      -

      heading [edit]

      +

      [edit] heading

      !! end @@ -8532,7 +8532,7 @@ HHP2.1: Heuristics for headings in preprocessor parenthetical structures !! result

      {{foo|

      -

      heading

      +

      heading

      !! end @@ -8544,7 +8544,7 @@ HHP2.2: Heuristics for headings in preprocessor parenthetical structures !! result

      {{foo|

      -

      heading [edit]

      +

      [edit] heading

      !! end -- 2.20.1