strip [[type:...]] in card export

This commit is contained in:
Damien Elmes 2019-03-05 08:55:57 +10:00
parent d0985a4e7c
commit 1c4a40a3cc

View File

@ -31,6 +31,7 @@ class Exporter:
text = text.replace("\n", " ") text = text.replace("\n", " ")
text = text.replace("\t", " " * 8) text = text.replace("\t", " " * 8)
text = re.sub("(?i)<style>.*?</style>", "", text) text = re.sub("(?i)<style>.*?</style>", "", text)
text = re.sub(r"\[\[type:[^]]+\]\]", "", text)
if "\"" in text: if "\"" in text:
text = "\"" + text.replace("\"", "\"\"") + "\"" text = "\"" + text.replace("\"", "\"\"") + "\""
return text return text