Trevor Parscal has submitted this change and it was merged.

Change subject: (bug 42140) Don't force spaces to underscores in internal links
......................................................................


(bug 42140) Don't force spaces to underscores in internal links

MWInternalLinkAnnotation was normalizing spaces to underscores. This is
bad. Instead, we now do the following:
* Normalize underscores to spaces for display purposes
* Store the original title without underscore/space mangling
* If the user didn't change the title (display title === original title
  with s/_/ /g), use the original title. Otherwise use the user's title
  verbatim, without normalizing either underscores or spaces.

Also, per a conversation with Gabriel, we now only restore hrefPrefix
when we're also restoring origTitle, otherwise Parsoid will barf.

Change-Id: Ia74a493b2bce96c9345b60ed692eeb2e43ebceff
---
M modules/ve/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
1 file changed, 14 insertions(+), 5 deletions(-)

Approvals:
  Trevor Parscal: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia74a493b2bce96c9345b60ed692eeb2e43ebceff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>

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

Reply via email to