Bug 35034 - moved autocomment-prefix between the prefix and the arrow. Follow up...
authorAmir E. Aharoni <amire80@users.mediawiki.org>
Tue, 13 Mar 2012 23:09:06 +0000 (23:09 +0000)
committerAmir E. Aharoni <amire80@users.mediawiki.org>
Tue, 13 Mar 2012 23:09:06 +0000 (23:09 +0000)
includes/Linker.php
tests/parser/parserTests.txt

index 917f438..918bebc 100644 (file)
@@ -1193,7 +1193,7 @@ class Linker {
                }
                if ( $pre ) {
                        # written summary $presep autocomment (summary /* section */)
-                       $auto = wfMsgExt( 'autocomment-prefix', array( 'escapenoentities', 'content' ) ) . $auto;
+                       $pre .= wfMsgExt( 'autocomment-prefix', array( 'escapenoentities', 'content' ) );
                }
                if ( $post ) {
                        # autocomment $postsep written summary (/* section */ summary)
index 6f5702d..65bd825 100644 (file)
@@ -8482,6 +8482,16 @@ comment title=[[Main Page]]
 <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
+Edit comment with section link and text before it (non-local, eg in history list)
+!! options
+comment title=[[Main Page]]
+!! input
+pre-comment text /* External links */ removed bogus entries
+!! result
+pre-comment text - <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
 Edit comment with section link (local, eg in diff view)
 !! options