mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-15 18:40:43 +00:00
🐛 fix logger escape tag #14
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import json
|
||||
import asyncio
|
||||
import dataclasses
|
||||
@ -9,6 +10,10 @@ from functools import wraps, partial
|
||||
from nonebot.typing import Any, Callable, Awaitable, overrides
|
||||
|
||||
|
||||
def escape_tag(s: str) -> str:
|
||||
return re.sub(r"</?((?:[fb]g\s)?[^<>\s]*)>", r"\\\g<0>", s)
|
||||
|
||||
|
||||
def run_sync(func: Callable[..., Any]) -> Callable[..., Awaitable[Any]]:
|
||||
"""
|
||||
:说明:
|
||||
|
Reference in New Issue
Block a user