diff --git a/code/shop.py b/code/shop.py index 3c7d84a..1566414 100644 --- a/code/shop.py +++ b/code/shop.py @@ -29,7 +29,7 @@ SECRET_KEY = os.getenv("SECRET_KEY", "development key") USERNAME = os.getenv("ADMIN_USER", "admin") PASSWORD = os.getenv("ADMIN_PASSWD", "default") MARKDOWN_STYLE = os.getenv("MARKDOWN_STYLE", "markdown") -URLFINDER = re.compile("((news|telnet|nttp|file|http|ftp|https)://[^ ]+)") +URLFINDER = re.compile("((news|telnet|nttp|file|http|ftp|https)://[^ <]+)") URLPARSER = re.compile(r"(\[)([^\]]+)(\])\(([^\)]+)\)") BOLDFINDER = re.compile(r"\*([^\*]+)\*") CODEFINDER = re.compile(r"\`([^\`]+)\`") @@ -145,9 +145,9 @@ def urlify(s): def checkbox_add(item): if MARKDOWN_STYLE == "markdown": - return f"[ ] {item}" + "\n" + return "\n" + f"[ ] {item}" if MARKDOWN_STYLE == "dokuwiki": - return f"- {item}" + "\n" + return "\n" + f"- {item}" def untick(item):