Skip to content

Commit

Permalink
fix(utils): fix CQCode.parse white space issue
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Feb 27, 2020
1 parent ef8a284 commit 6013f95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/koishi-utils/src/cqCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace CQCode {
const [_, type, attrs] = capture
const data: Record<string, string | number> = {}
attrs.slice(1).split(/,/g).forEach((str) => {
const [_, key, value] = str.match(/^(\w+)=(.+)$/)
const [_, key, value] = str.match(/^(\w+)=([\s\S]+)$/)
data[key] = unescape(value)
})
return { type, data, capture }
Expand Down

0 comments on commit 6013f95

Please sign in to comment.