mirror of
https://github.com/Steffo99/unimore-bda-6.git
synced 2024-11-22 07:54:19 +00:00
Convert unichr
calls to chr
This commit is contained in:
parent
29c3d05b6c
commit
ce959f18be
1 changed files with 2 additions and 2 deletions
4
unimore_bda_6/vendor/potts.py
vendored
4
unimore_bda_6/vendor/potts.py
vendored
|
@ -172,7 +172,7 @@ class Tokenizer:
|
|||
entnum = ent[2:-1]
|
||||
try:
|
||||
entnum = int(entnum)
|
||||
s = s.replace(ent, unichr(entnum))
|
||||
s = s.replace(ent, chr(entnum))
|
||||
except:
|
||||
pass
|
||||
# Now the alpha versions:
|
||||
|
@ -181,7 +181,7 @@ class Tokenizer:
|
|||
for ent in ents:
|
||||
entname = ent[1:-1]
|
||||
try:
|
||||
s = s.replace(ent, unichr(html.entities.name2codepoint[entname]))
|
||||
s = s.replace(ent, chr(html.entities.name2codepoint[entname]))
|
||||
except:
|
||||
pass
|
||||
s = s.replace(amp, " and ")
|
||||
|
|
Loading…
Reference in a new issue