From 0ceb2558659e892b4d1690b48523a366e1882dad Mon Sep 17 00:00:00 2001
From: Lynne <lynne@bune.city>
Date: Mon, 1 Jul 2019 17:23:18 +1000
Subject: [PATCH] fixed #25

---
 gen.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gen.py b/gen.py
index 442254f..1671692 100755
--- a/gen.py
+++ b/gen.py
@@ -4,7 +4,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from mastodon import Mastodon
-import argparse, sys, traceback, json
+import argparse, sys, traceback, json, re
 import functions
 
 parser = argparse.ArgumentParser(description='Generate and post a toot.')
@@ -26,6 +26,8 @@ if not args.simulate:
 
 if __name__ == '__main__':
 	toot = functions.make_toot()
+	if cfg['strip_paired_punctuation']:
+		toot = re.sub(r"[\[\]\(\)\{\}\"“”«»„]", "", toot)
 	if not args.simulate:
 		try:
 			if toot['media'] != None: