mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix entsToTxt()
This commit is contained in:
parent
f6f9b767c0
commit
63499fb7e9
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ import os
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
import math
|
import math
|
||||||
import html.entities
|
from html.entities import name2codepoint
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -171,7 +171,7 @@ def entsToTxt(html):
|
||||||
else:
|
else:
|
||||||
# named entity
|
# named entity
|
||||||
try:
|
try:
|
||||||
text = chr(html.entities.name2codepoint[text[1:-1]])
|
text = chr(name2codepoint[text[1:-1]])
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
return text # leave as is
|
return text # leave as is
|
||||||
|
|
Loading…
Reference in a new issue