Skip to content
Snippets Groups Projects
Commit 69718349 authored by Scott Berg's avatar Scott Berg
Browse files

Update requirementLine pipe to always return one line for all TLines

parent 092a1080
No related branches found
No related tags found
No related merge requests found
...@@ -10,10 +10,9 @@ export class RequirementLinePipe implements PipeTransform { ...@@ -10,10 +10,9 @@ export class RequirementLinePipe implements PipeTransform {
const singleLine = lines.join(' ').trim(); const singleLine = lines.join(' ').trim();
const matches = singleLine.match(/^((IP)|(IN-P)|(PL)|(R)|(<>)|\+|\-|\*)+(?![a-zA-Z])/g); const matches = singleLine.match(/^((IP)|(IN-P)|(PL)|(R)|(<>)|\+|\-|\*)+(?![a-zA-Z])/g);
if (matches && matches.length > 0) { // If symbol matches are found return the single line without the matches
lines = [singleLine.substr(matches[0].length)]; // Else return just the single line
} return matches && matches.length > 0 ? [singleLine.substr(matches[0].length)] : [singleLine];
break;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment