Skip to content

Commit

Permalink
Fixed Dashed Line Break Issue (#222)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ptvrajsk authored Oct 4, 2019
1 parent 6bed81b commit dac411b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/core/services/issue.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dac411b

Please sign in to comment.