From dac411b69d65727e106af0ff2e779914b8cf5851 Mon Sep 17 00:00:00 2001 From: ptvrajsk <39243082+ptvrajsk@users.noreply.github.com> Date: Fri, 4 Oct 2019 20:05:13 +0800 Subject: [PATCH] Fixed Dashed Line Break Issue (#222) Initially if the user keys in a set of dashes (for a line break) that is > 19 the app will not parse the tester response properly but now the app can parse the response as long as the number of dashes is not exactly 19 --- src/app/core/services/issue.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/core/services/issue.service.ts b/src/app/core/services/issue.service.ts index 368b64d06..d685a347d 100644 --- a/src/app/core/services/issue.service.ts +++ b/src/app/core/services/issue.service.ts @@ -542,7 +542,8 @@ export class IssueService { let matches; const testerResponses: TesterResponse[] = []; const regex: RegExp = new RegExp('#{2} *:question: *([\\w ]+)[\\r\\n]*(Team Chose.*[\\r\\n]* *Originally.*' - + '|Team Chose.*[\\r\\n]*)[\\r\\n]*(- \\[x? ?\\] I disagree)[\\r\\n]*\\*\\*Reason *for *disagreement:\\*\\* *([\\s\\S]*?)-{19}', + + '|Team Chose.*[\\r\\n]*)[\\r\\n]*(- \\[x? ?\\] I disagree)[\\r\\n]*\\*\\*Reason *for *disagreement:\\*\\* *([\\s\\S]*?)' + + '[\\n\\r]-{19}[\\n\\r]{1}', 'gi'); while (matches = regex.exec(toParse)) { if (matches && matches.length > this.MINIMUM_MATCHES) {