jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343901 )

Change subject: Section editing: strip links from heading text used for edit 
summary
......................................................................


Section editing: strip links from heading text used for edit summary

Stops us including "[edit]" in the summary when people have marked whole
headings for translation.

Bug: T160911
Change-Id: I906398e6bf45433d904795847f59b5bf0148092f
---
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  Esanders: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index a9e718c..d9394ba 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -2028,7 +2028,9 @@
                        headingNode = $section.data( 'view' );
 
                        if ( $section.length && new mw.Uri().query.summary === 
undefined ) {
-                               headingText = $section.text();
+                               // Due to interactions with Translate, strip 
out mw-
+                               // editsection from the heading.
+                               headingText = $section.clone().find( 
'span.mw-editsection' ).remove().end().text();
                        }
 
                        if ( headingNode ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I906398e6bf45433d904795847f59b5bf0148092f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: DLynch <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to