tapjs/tap-parser

Remove trailing newline from strings.

jamestalmage opened this issue · 2 comments

I propose we strip trailing newline characters from the following event strings:

Also, in the case of comment events, I also think we should remove the leading "# " (hash plus one whitespace char).

Removing these things means that you have to add them back in synthetically if you ever want the raw data.

Whenever I have parsers that nest, I invariably find myself in a position where I want to pass data up or down the hierarchy, so I tend to avoid that sort of trimming as a general rule.

It seems like an unnecessary breaking change. Do you have a use case for it?

(happy to reopen, just closing for now because it needs some additional justification before accepting)