mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
strip [[type:...]] in card export
This commit is contained in:
parent
d0985a4e7c
commit
1c4a40a3cc
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue