Skip to content

Commit 2a283e7

Browse files
committed
update
1 parent a484a65 commit 2a283e7

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 0.0.3
2+
3+
## bug修复
4+
5+
+ 修正`from_content`方法的data和comment结尾会换行的问题
6+
17
# 0.0.2
28

39
## 修正实现

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = sserender
3-
version = 0.0.2
3+
version = 0.0.3
44
author = hsz
55
author_email = hsz1273327@gmail.com
66
description = sse message render

sserender/sse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ def from_content(clz, content: Union[str, bytes], *, strict: bool = False) -> "S
137137
if event:
138138
args.update({"event": event})
139139
if data:
140-
args.update({"data": data})
140+
args.update({"data": data.strip()})
141141
if retry:
142142
args.update({"retry": retry})
143143
if comment:
144-
args.update({"comment": comment})
144+
args.update({"comment": comment.strip()})
145145
return clz(**args)

0 commit comments

Comments
 (0)