From 69718349b782f1b1ac4b32e7b4314424cf74c929 Mon Sep 17 00:00:00 2001 From: Scott Berg <scott.berg@wisc.edu> Date: Thu, 22 Aug 2019 18:24:49 +0000 Subject: [PATCH] Update requirementLine pipe to always return one line for all TLines --- src/app/dars/pipes/requirement-line.pipe.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/dars/pipes/requirement-line.pipe.ts b/src/app/dars/pipes/requirement-line.pipe.ts index 918c295..b278e52 100644 --- a/src/app/dars/pipes/requirement-line.pipe.ts +++ b/src/app/dars/pipes/requirement-line.pipe.ts @@ -10,10 +10,9 @@ export class RequirementLinePipe implements PipeTransform { const singleLine = lines.join(' ').trim(); const matches = singleLine.match(/^((IP)|(IN-P)|(PL)|(R)|(<>)|\+|\-|\*)+(?![a-zA-Z])/g); - if (matches && matches.length > 0) { - lines = [singleLine.substr(matches[0].length)]; - } - break; + // If symbol matches are found return the single line without the matches + // Else return just the single line + return matches && matches.length > 0 ? [singleLine.substr(matches[0].length)] : [singleLine]; } } -- GitLab