Skip to content

Commit b425330

Browse files
committed
keep crlf in texts
1 parent 2c2bb51 commit b425330

4 files changed

Lines changed: 1531 additions & 1341 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ ci:
66
autoupdate_commit_msg: "chore: auto update by pre-commit hooks"
77
repos:
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.5.0
9+
rev: v0.6.9
1010
hooks:
1111
- id: ruff
1212
args: [--fix, --exit-non-zero-on-fix]
13-
stages: [commit]
13+
stages: [pre-commit]
1414
- id: ruff-format
1515

1616
- repo: https://github.com/pre-commit/mirrors-prettier
1717
rev: v4.0.0-alpha.8
1818
hooks:
1919
- id: prettier
2020
types_or: [javascript, jsx, ts, tsx, markdown, yaml, json]
21-
stages: [commit]
21+
stages: [pre-commit]

nonebot_plugin_memes_api/matchers/command.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
Alconna,
1717
Args,
1818
At,
19+
CommandMeta,
1920
Image,
2021
MultiVar,
2122
Text,
@@ -165,7 +166,13 @@ def create_matcher(meme: MemeInfo):
165166
)
166167
]
167168
meme_matcher = on_alconna(
168-
Alconna(prefixes, meme.keywords[0], *options, arg_meme_params),
169+
Alconna(
170+
prefixes,
171+
meme.keywords[0],
172+
*options,
173+
arg_meme_params,
174+
meta=CommandMeta(keep_crlf=True),
175+
),
169176
aliases=set(meme.keywords[1:]),
170177
block=False,
171178
priority=12,

0 commit comments

Comments
 (0)