You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by to...@apache.org on 2022/08/06 08:59:18 UTC
[lucene-jira-archive] branch refine-regex-for-mentions-parens created (now 95c7c0de)
This is an automated email from the ASF dual-hosted git repository.
tomoko pushed a change to branch refine-regex-for-mentions-parens
in repository https://gitbox.apache.org/repos/asf/lucene-jira-archive.git
at 95c7c0de merge main
This branch includes the following new commits:
new 79bc9d2f capture mentions right before/after parentheses
new 95c7c0de merge main
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[lucene-jira-archive] 02/02: merge main
Posted by to...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tomoko pushed a commit to branch refine-regex-for-mentions-parens
in repository https://gitbox.apache.org/repos/asf/lucene-jira-archive.git
commit 95c7c0de18d38e5228a285b6097b627057ad2775
Merge: 79bc9d2f 61101b96
Author: Tomoko Uchida <to...@gmail.com>
AuthorDate: Sat Aug 6 17:59:03 2022 +0900
merge main
[lucene-jira-archive] 01/02: capture mentions right before/after parentheses
Posted by to...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tomoko pushed a commit to branch refine-regex-for-mentions-parens
in repository https://gitbox.apache.org/repos/asf/lucene-jira-archive.git
commit 79bc9d2f88be8b3678b8b02c5ed58009dcb7e317
Author: Tomoko Uchida <to...@gmail.com>
AuthorDate: Sat Aug 6 17:56:20 2022 +0900
capture mentions right before/after parentheses
---
migration/src/jira_util.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/migration/src/jira_util.py b/migration/src/jira_util.py
index d6f17961..7f8174f6 100644
--- a/migration/src/jira_util.py
+++ b/migration/src/jira_util.py
@@ -228,8 +228,8 @@ JIRA_EMOJI_TO_UNICODE = {
REGEX_CRLF = re.compile(r"\r\n")
REGEX_JIRA_KEY = re.compile(r"[^/]LUCENE-\d+")
-REGEX_MENTION_ATMARK = re.compile(r"(^@[\w\s\.@_-]+?)|((?<=[\s\(\"',.])@[\w\s\.@_-]+?)($|(?=[\s\)\"'\?!,,;:\..]))") # this regex may capture only "@" + "<username>" mentions
-REGEX_MENION_TILDE = re.compile(r"(^\[~[\w\s\.@_-]+?\])|((?<=[\s\(\"',.])\[~[\w\s\.@_-]+?\])($|(?=[\s\)\"'\?!,,;:\..]))") # this regex may capture only "[~" + "<username>" + "]" mentions
+REGEX_MENTION_ATMARK = re.compile(r"(^@[\w\s\.@_-]+?)|((?<=[\s\({\[\"',.])@[\w\s\.@_-]+?)($|(?=[\s\)}\]\"'\?!,,;:\..]))") # this regex may capture only "@" + "<username>" mentions
+REGEX_MENION_TILDE = re.compile(r"(^\[~[\w\s\.@_-]+?\])|((?<=[\s\({\[\"',.])\[~[\w\s\.@_-]+?\])($|(?=[\s\)|\]\"'\?!,,;:\..]))") # this regex may capture only "[~" + "<username>" + "]" mentions
REGEX_LINK = re.compile(r"\[([^\]]+)\]\(([^\)]+)\)")
REGEX_GITHUB_ISSUE_LINK = re.compile(r"(\s)(#\d+)(\s)")