Remove newlines from group IDs
This commit is contained in:
parent
ae7d6aa900
commit
5c8f734e67
2 changed files with 15 additions and 1 deletions
|
@ -73,7 +73,7 @@ exports.redactGroupIds = text => {
|
|||
return text.replace(
|
||||
GROUP_ID_PATTERN,
|
||||
(match, before, id, after) =>
|
||||
`${before}${REDACTION_PLACEHOLDER}${id.slice(-3)}${after}`
|
||||
`${before}${REDACTION_PLACEHOLDER}${removeNewlines(id).slice(-3)}${after}`
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -86,3 +86,5 @@ exports.redactAll = compose(
|
|||
exports.redactGroupIds,
|
||||
exports.redactPhoneNumbers
|
||||
);
|
||||
|
||||
const removeNewlines = text => text.replace(/\r?\n|\r/g, '');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue