jenkins-bot has submitted this change and it was merged.

Change subject: Update VE core submodule to 89f6c2d7
......................................................................


Update VE core submodule to 89f6c2d7

New changes:
89f6c2d Strip trailing quotes when autolinking URLs

Local changes:
* Strip trailing quotes and non-URL characters when auto-linking

  Update ve-mw to match I58a9c7f97ef10d9f495e65da17f208b9fc431aa4 in core,
  since otherwise the ve.ui.LinkAction.test.js case with a quoted link
  will begin to fail.

  Make the set of stripped characters better match the combination of
  EXT_LINK_URL_CLASS in the PHP parser and the explicitly-stripped
  trailing punctuation in Parser.php::makeFreeExternalLink().

  Add some international quotation marks while we're at it to make
  everyone equally happy.

Change-Id: Iaffac4b073aeafa4f1137265c2d95e425c24d553
---
M lib/ve
M modules/ve-mw/ui/actions/ve.ui.MWLinkAction.js
2 files changed, 9 insertions(+), 1 deletion(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/ve b/lib/ve
index b5eaa6f..89f6c2d 160000
--- a/lib/ve
+++ b/lib/ve
-Subproject commit b5eaa6fe04b14e72b204d25e038cd41b47e74537
+Subproject commit 89f6c2d7b538dda75b6f3bea280795f37baf851a
diff --git a/modules/ve-mw/ui/actions/ve.ui.MWLinkAction.js 
b/modules/ve-mw/ui/actions/ve.ui.MWLinkAction.js
index 62acfa8..a9f44de 100644
--- a/modules/ve-mw/ui/actions/ve.ui.MWLinkAction.js
+++ b/modules/ve-mw/ui/actions/ve.ui.MWLinkAction.js
@@ -45,7 +45,15 @@
  * @inheritdoc
  */
 ve.ui.MWLinkAction.prototype.getTrailingPunctuation = function ( candidate ) {
-       return /\(/.test( candidate ) ? /[,;.:!?]+$/ : /[,;.:!?)]+$/;
+       // This is:
+       // * the "trailing punctuation" character set from
+       //   Parse.php::makeFreeExternalLink(): [,;.:!?] and sometimes [)]
+       // * extended with characters banned by EXT_LINK_URL_CLASS: []<>"
+       // * further extended with international close quotes: "'”’›»“‘‹«」』
+       //   https://en.wikipedia.org/wiki/Quotation_mark
+       return /\(/.test( candidate ) ?
+               /[,;.:!?\[\]<>\"\'”’›»“‘‹«」』]+$/ :
+               /[,;.:!?\[\]<>\"\'”’›»“‘‹«」』)]+$/;
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaffac4b073aeafa4f1137265c2d95e425c24d553
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Cscott <canan...@wikimedia.org>
Gerrit-Reviewer: Esanders <esand...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to