refactor(parser): rework RawMessage into Buffer

The old RawMessage implementation effectively brute forced the initial
processing of a comment message by breaking it down into lines, and
grouping them into paragraphs.

This is useful, but, we actually only need the first paragraph, the last
paragraph, and then everything between. So there's no need to break down
the message into each paragraph.

In theory, the Buffer implementation is more performant than RawMessage
was, but most importantly I think it will be easier to work with it.
This commit is contained in:
2021-08-15 18:17:32 +01:00
parent e8ca009440
commit 758deef7e9
8 changed files with 1788 additions and 1156 deletions

1107
buffer_test.go Normal file

File diff suppressed because it is too large Load Diff