Skip to content

Commit

Permalink
Multi-line support for Signal
Browse files Browse the repository at this point in the history
  • Loading branch information
joweich committed Dec 3, 2023
1 parent 5c71025 commit 264937c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion chatminer/chatparsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def _is_new_message(line: str):
if buffer:
buffer.append(line)
buffer.reverse()
self._raw_messages.append(" ".join(buffer))
joined_buffer = " ".join(buffer)
self._raw_messages.append("".join(joined_buffer.splitlines()))
buffer.clear()
else:
self._raw_messages.append(line)
Expand Down
3 changes: 2 additions & 1 deletion test/signal/test_export.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[2019-12-24, 12:23] Jane Doe: Hello John!
[2020-01-17, 21:49] John Doe: Hello Jane!
[2020-01-17, 21:49] John Doe: Hello
Jane!

0 comments on commit 264937c

Please sign in to comment.