🐛 fix logger escape tag #14

This commit is contained in:
yanyongyu
2020-09-30 18:01:31 +08:00
parent edc3aadbb5
commit 921acff09e
3 changed files with 12 additions and 3 deletions

View File

@ -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]]:
"""
:说明: