Follow up to r105855 - now with updated phpunit tests.
authorAmir E. Aharoni <amire80@users.mediawiki.org>
Tue, 17 Jan 2012 00:17:55 +0000 (00:17 +0000)
committerAmir E. Aharoni <amire80@users.mediawiki.org>
Tue, 17 Jan 2012 00:17:55 +0000 (00:17 +0000)
includes/Linker.php
tests/parser/parserTests.txt

index d4fcb2f..ab921d7 100644 (file)
@@ -1178,7 +1178,6 @@ class Linker {
                                $link = '';
                        }
                }
-               $auto = "$link$auto";
                if ( $pre ) {
                        # written summary $presep autocomment (summary /* section */)
                        $auto = wfMsgExt( 'autocomment-prefix', array( 'escapenoentities', 'content' ) ) . $auto;
@@ -1188,7 +1187,7 @@ class Linker {
                        $auto .= wfMsgExt( 'colon-separator', array( 'escapenoentities', 'content' ) );
                }
                $auto = '<span class="autocomment">' . $auto . '</span>';
-               $comment = $pre . $auto . $post;
+               $comment = $pre . $link . $wgLang->getDirMark() . '<span dir="auto">' . $auto . $post . '</span>';
                return $comment;
        }
 
index 9dc3a91..9c276e0 100644 (file)
@@ -8479,7 +8479,7 @@ comment title=[[Main Page]]
 !! input
 /* External links */ removed bogus entries
 !! result
-<span class="autocomment"><a href="/wiki/Main_Page#External_links" title="Main Page">→</a>External links: </span> removed bogus entries
+<a href="/wiki/Main_Page#External_links" title="Main Page">→</a>‎<span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
 !!end
 
 !! test
@@ -8489,7 +8489,7 @@ comment local title=[[Main Page]]
 !! input
 /* External links */ removed bogus entries
 !! result
-<span class="autocomment"><a href="#External_links">→</a>External links: </span> removed bogus entries
+<a href="#External_links">→</a>‎<span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
 !!end
 
 !! test
@@ -8576,7 +8576,7 @@ title=[[Main Page]]
 !!input
 /* __hello__world__ */
 !! result
-<span class="autocomment"><a href="/wiki/Main_Page#hello_world" title="Main Page">→</a>__hello__world__</span>
+<a href="/wiki/Main_Page#hello_world" title="Main Page">→</a>‎<span dir="auto"><span class="autocomment">__hello__world__</span></span>
 !! end
 
 !! test