mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Merge pull request #1145 from rgreenblatt/main
solve missing escape of ' (fixes #1144)
This commit is contained in:
commit
a20606530e
2 changed files with 2 additions and 1 deletions
|
@ -77,6 +77,7 @@ Kerrick Staley <kerrick@kerrickstaley.com>
|
||||||
Maksim Abramchuk <maximabramchuck@gmail.com>
|
Maksim Abramchuk <maximabramchuck@gmail.com>
|
||||||
Benjamin Kulnik <benjamin.kulnik@student.tuwien.ac.at>
|
Benjamin Kulnik <benjamin.kulnik@student.tuwien.ac.at>
|
||||||
Shaun Ren <shaun.ren@linux.com>
|
Shaun Ren <shaun.ren@linux.com>
|
||||||
|
Ryan Greenblatt <greenblattryan@gmail.com>
|
||||||
|
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Exporter:
|
||||||
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)
|
text = re.sub(r"\[\[type:[^]]+\]\]", "", text)
|
||||||
if '"' in text:
|
if '"' in text or "'" in text:
|
||||||
text = '"' + text.replace('"', '""') + '"'
|
text = '"' + text.replace('"', '""') + '"'
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue