From 0a88ecbc9930af381fbc80295c24abdc0370488d Mon Sep 17 00:00:00 2001 From: Blake DeMarcy Date: Fri, 3 Mar 2017 19:56:08 -0600 Subject: [PATCH] removed some old references --- src/endpoints.py | 4 ---- src/formatting.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/endpoints.py b/src/endpoints.py index 9317ac3..973a528 100644 --- a/src/endpoints.py +++ b/src/endpoints.py @@ -136,8 +136,6 @@ def thread_create(json): json["body"], json["title"], json["tags"]) - if json.get("nomarkup"): - thread["body"] = formatting.cleanse(thread["body"]) return schema.response(thread) @@ -146,8 +144,6 @@ def thread_reply(json): json["thread_id"], json["user"], json["body"]) - if json.get("nomarkup"): - reply["body"] = formatting.cleanse(reply["body"]) return schema.response(reply) diff --git a/src/formatting.py b/src/formatting.py index 0e4f4fb..56614c3 100644 --- a/src/formatting.py +++ b/src/formatting.py @@ -2,7 +2,7 @@ from markdown import markdown from html import escape import re -# these parameters are utter nonsense... + COLORS = ["red", "green", "yellow", "blue", "magenta", "cyan"] MARKUP = ["bold", "italic", "underline", "strike"] TOKENS = re.compile(r"\[({}): (.+?)]".format("|".join(COLORS + MARKUP)), flags=re.DOTALL)