Skip to content

Commit fd3fb27

Browse files
committed
Replace \r\n -> \n in comment bodies. Process * being used for list syntax
1 parent 494bb73 commit fd3fb27

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

command_handler.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,18 @@ def __init__(self, config: Config, store: Storage, repo: Repository):
4343
self.proposal = None
4444
self.comment = None
4545
self.proposal_labels_str = []
46-
self.team_vote_regex = re.compile(r"^- \[x\] @(.+)$", re.IGNORECASE)
47-
self.resolved_concern_regex = re.compile(r"^\* ~~(.+)~~.*")
46+
self.team_vote_regex = re.compile(r"^[*|-] \[x\] @(.+)$", re.IGNORECASE)
47+
self.resolved_concern_regex = re.compile(r"^[*|-] ~~(.+)~~.*")
4848

4949
# Set up FCP timer handler, and callback functions
5050
self.fcp_timers = FCPTimers(
5151
store, self._on_fcp_timer_fired
5252
)
5353

5454
def handle_comment(self, comment: Dict):
55+
# Replace any instances of \r\n with just \n
56+
comment["comment"]["body"] = comment["comment"]["body"].replace("\r\n", "\n")
57+
5558
# Check for any commands
5659
commands = self.parse_commands_from_text(comment["comment"]["body"])
5760

0 commit comments

Comments
 (0)