mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Data sometimes can be apparently none, in that case return empty string
This commit is contained in:
parent
5c63a48954
commit
cb733ccb4b
|
@ -78,7 +78,7 @@ def link_formatter(link: str) -> str:
|
||||||
|
|
||||||
def escape_formatting(data: str) -> str:
|
def escape_formatting(data: str) -> str:
|
||||||
"""Escape Discord formatting"""
|
"""Escape Discord formatting"""
|
||||||
return re.sub(r"([`_*~:<>{}@/|\\\[\]\(\)])", "\\\\\\1", data, 0)
|
return re.sub(r"([`_*~:<>{}@/|\\\[\]\(\)])", "\\\\\\1", data, 0) if data is not None else ""
|
||||||
|
|
||||||
|
|
||||||
def create_article_path(article: str, WIKI_ARTICLE_PATH: str) -> str:
|
def create_article_path(article: str, WIKI_ARTICLE_PATH: str) -> str:
|
||||||
|
|
Loading…
Reference in a new issue