The fix in #129 made it clear that we can't reliably tell these cases apart. For example consider the string: "raw1, label1 | raw2, label2". Inserting an extra | anywhere would create a new raw-label pair without a comma which causes the first error above to fire. The second error becomes redundant and it never fired.
Proposed Solution
Simplify our erroring scheme so that a single error is thrown that warns generally about commas or pipes in the labels.
Checklist
[x] The issue is atomic
[x] The issue description is documented
[x] The issue title describes the problem succinctly
Feature Request Description
parse_labels()
currently has two distinct errors for problematic labels: https://github.com/CHOP-CGTInformatics/REDCapTidieR/blob/f1ed7ac6f7edf4984b16796a74c3f58780306f45/R/utils.R#L127-L130https://github.com/CHOP-CGTInformatics/REDCapTidieR/blob/f1ed7ac6f7edf4984b16796a74c3f58780306f45/R/utils.R#L148-L151
The fix in #129 made it clear that we can't reliably tell these cases apart. For example consider the string:
"raw1, label1 | raw2, label2"
. Inserting an extra|
anywhere would create a new raw-label pair without a comma which causes the first error above to fire. The second error becomes redundant and it never fired.Proposed Solution
Simplify our erroring scheme so that a single error is thrown that warns generally about commas or pipes in the labels.
Checklist