Skip to content

Commit

Permalink
keep crlf in texts
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetWq committed Nov 13, 2024
1 parent 2c2bb51 commit b425330
Show file tree
Hide file tree
Showing 4 changed files with 1,531 additions and 1,341 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ ci:
autoupdate_commit_msg: "chore: auto update by pre-commit hooks"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.6.9
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
stages: [commit]
stages: [pre-commit]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [javascript, jsx, ts, tsx, markdown, yaml, json]
stages: [commit]
stages: [pre-commit]
9 changes: 8 additions & 1 deletion nonebot_plugin_memes_api/matchers/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Alconna,
Args,
At,
CommandMeta,
Image,
MultiVar,
Text,
Expand Down Expand Up @@ -165,7 +166,13 @@ def create_matcher(meme: MemeInfo):
)
]
meme_matcher = on_alconna(
Alconna(prefixes, meme.keywords[0], *options, arg_meme_params),
Alconna(
prefixes,
meme.keywords[0],
*options,
arg_meme_params,
meta=CommandMeta(keep_crlf=True),
),
aliases=set(meme.keywords[1:]),
block=False,
priority=12,
Expand Down
Loading

0 comments on commit b425330

Please sign in to comment.