Skip to content

Commit

Permalink
fix(event): fix CR in text
Browse files Browse the repository at this point in the history
  • Loading branch information
ilharp committed Apr 16, 2024
1 parent 323d560 commit fa64f9d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/engine-chronocat-event/src/parser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,13 @@ async function parseElements(
switch (m.textElement!.atType) {
case AtType.None: {
// 纯文本消息
elements.push(ctx.chronocat.h.text(m.textElement?.content))
elements.push(
ctx.chronocat.h.text(
m
.textElement!.content.replaceAll('\r\n', '\n')
.replaceAll('\r', '\n'),
),
)
break
}

Expand Down

0 comments on commit fa64f9d

Please sign in to comment.