Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/98119


Change subject: Add parser test for empty self-link with empty fragment 
[[#|...]]
......................................................................

Add parser test for empty self-link with empty fragment [[#|...]]

This really shouldn't be linked to the main page – but it does. This
is because Title consider an empty fragment and no fragment to be the
same thing.

This behavior is really stupid. Can we fix it?

Change-Id: I9374eb485605c8af8d2a4d236120e97ec642d44a
---
M tests/parser/parserTests.txt
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/98119/1

diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index cc935da..b4a8288 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -4833,6 +4833,15 @@
 !! end
 
 !! test
+Self-link with empty fragment
+!! input
+[[#|Stay here]]
+!! result
+<p><a href="/wiki/>Stay here</a>
+</p>
+!! end
+
+!! test
 Link with prefix
 !! input
 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], 
XXX[[Main Page]]

-- 
To view, visit https://gerrit.wikimedia.org/r/98119
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9374eb485605c8af8d2a4d236120e97ec642d44a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to