Commit f399369
authored
Replace fussy parser processing; Return message text verbatim (#312)
* Add logging to parser
* Fix parser to not munge ":" (#310) or whitespace (#311) in message text
Do not use lstrip() to remove single protocol characters from the raw
data, since that will overzealously strip actual parsed-data content.
E.g. lstrip will strip all ":" characters from the start of messages
which actually DO begin with a ":" character (#310). Note also that
EVERY lstrip() call in parser is likewise inappropriate.
Do not split() and then re-join() the message text, since that will
compress multiple consecutive whitespace characters into just one space
and precludes passing the tab character at all. E.g. the split/join
method munges "foo bar" to just "foo bar" (#311).
Replace fussy parser processing with an re.search() instead.
Eliminate all the overzealous lstrip calls.
Always return the message text verbatim.
Remove unused global var 'TMI'.
* Black formatting1 parent 6d5fd64 commit f399369
1 file changed
+31
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| 61 | + | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
85 | 77 | | |
86 | 78 | | |
87 | 79 | | |
| |||
111 | 103 | | |
112 | 104 | | |
113 | 105 | | |
114 | | - | |
115 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
116 | 111 | | |
117 | 112 | | |
118 | | - | |
| 113 | + | |
| 114 | + | |
119 | 115 | | |
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
123 | 119 | | |
124 | 120 | | |
125 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| |||
0 commit comments