diff options
| author | Dustin Mierau <dustin@mierau.me> | 2023-12-07 00:36:55 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2023-12-07 00:36:55 -0800 |
| commit | e93eea234f294551c20787718cead4877429a5b7 (patch) | |
| tree | 9a7453aafa04d868c68bcd1d15abe7465a827393 | |
| parent | f0e278db3b6e9022355ac8a25c301936f15454cf (diff) | |
Fix chat message parser regex.
| -rw-r--r-- | Hotline/Hotline/HotlineClient.swift | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Hotline/Hotline/HotlineClient.swift b/Hotline/Hotline/HotlineClient.swift index 1eb7719..c325fb7 100644 --- a/Hotline/Hotline/HotlineClient.swift +++ b/Hotline/Hotline/HotlineClient.swift @@ -21,7 +21,7 @@ struct HotlineChat: Identifiable { let username: String let type: HotlineChatType - static let parser = /\s+(.+):\s+(.*)/ + static let parser = /^\s*([^\:]+)\:\s*(.*)/ init(text: String, type: HotlineChatType = .message) { self.type = type |