mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2025-09-09 05:36:22 +00:00
feat: 添加了对markdown的简单封装
This commit is contained in:
@ -29,3 +29,16 @@ def convert_size(size: int, precision: int = 2, add_unit: bool = True, suffix: s
|
||||
return f"{size:.{precision}f} Y" + suffix
|
||||
else:
|
||||
return f"{size:.{precision}f}"
|
||||
|
||||
|
||||
def de_escape(text: str) -> str:
|
||||
str_map = {
|
||||
"[": "[",
|
||||
"]": "]",
|
||||
"&": "&",
|
||||
",": ",",
|
||||
}
|
||||
for k, v in str_map.items():
|
||||
text = text.replace(k, v)
|
||||
|
||||
return text
|
||||
|
Reference in New Issue
Block a user