MarkTraceur has uploaded a new change for review.
https://gerrit.wikimedia.org/r/95691
Change subject: Handle 1 comment too
......................................................................
Handle 1 comment too
Great job Mark
Change-Id: Ibba3b1cf46013b45dadd441e0b19a368c8d746bb
---
M src/preprocess.js
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit
refs/changes/91/95691/1
diff --git a/src/preprocess.js b/src/preprocess.js
index e4cd642..d7f5ec4 100644
--- a/src/preprocess.js
+++ b/src/preprocess.js
@@ -60,12 +60,12 @@
url: message.change.url,
owner: message.change.owner.name
};
- var inlineCount = message.comment.match(/(?:^|\s)\((\d+)
comments\)(?:$|\s)/),
+ var inlineCount = message.comment.match(/(?:^|\s)\((\d+)
comments?\)(?:$|\s)/),
comment = message.comment
// Strip out useless first line
.replace(/^\s*Patch Set \d+:.*$/m, '')
// Strip out count of inline comments
- .replace(/^\s*\(\d+ comments\)$/m, '')
+ .replace(/^\s*\(\d+ comments?\)$/m, '')
.trim().split("\n")[0].trim();
if(!comment) {
comment = message.change.subject.substring(0, 140);
--
To view, visit https://gerrit.wikimedia.org/r/95691
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibba3b1cf46013b45dadd441e0b19a368c8d746bb
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits