[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Summary: update regex for non-ASCII parentheses

2018-01-12 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403880 )

Change subject: Summary: update regex for non-ASCII parentheses
..


Summary: update regex for non-ASCII parentheses

The previous version created character classes of three times the same
characters each.

((( -> \uFF08\uFF08\uFF08
))) -> \uFF09\uFF09\uFF09

This is redundant. Since there is only one character left we don't need
the character class for that anymore.

Change-Id: I5ece83d2d5bde8cfe3afc6694c26683dddae2e78
---
M lib/transformations/summarize.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/transformations/summarize.js b/lib/transformations/summarize.js
index 9bdb1d5..c5775f4 100644
--- a/lib/transformations/summarize.js
+++ b/lib/transformations/summarize.js
@@ -125,7 +125,7 @@
 
 // 3. Remove content inside any other non-latin parentheticals. The 
behaviour is
 // the same as 1 but for languages that are not latin based
-html = html.replace(/[(((].+ .+[)))]/g, ' ');
+html = html.replace(/(.+ .+)/g, ' ');
 
 // 4. remove all double spaces created by the above
 html = html.replace(/ +/g, ' ');

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ece83d2d5bde8cfe3afc6694c26683dddae2e78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Summary: update regex for non-ASCII parentheses

2018-01-11 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403880 )

Change subject: Summary: update regex for non-ASCII parentheses
..

Summary: update regex for non-ASCII parentheses

The previous version created character classes of three times the same
characters each.

((( -> \uFF08\uFF08\uFF08
))) -> \uFF09\uFF09\uFF09

This is redundant. Since there is only one character left we don't need
the character class for that anymore.

Change-Id: I5ece83d2d5bde8cfe3afc6694c26683dddae2e78
---
M lib/transformations/summarize.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/80/403880/1

diff --git a/lib/transformations/summarize.js b/lib/transformations/summarize.js
index 9bdb1d5..c5775f4 100644
--- a/lib/transformations/summarize.js
+++ b/lib/transformations/summarize.js
@@ -125,7 +125,7 @@
 
 // 3. Remove content inside any other non-latin parentheticals. The 
behaviour is
 // the same as 1 but for languages that are not latin based
-html = html.replace(/[(((].+ .+[)))]/g, ' ');
+html = html.replace(/(.+ .+)/g, ' ');
 
 // 4. remove all double spaces created by the above
 html = html.replace(/ +/g, ' ');

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ece83d2d5bde8cfe3afc6694c26683dddae2e78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 

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