aboutsummaryrefslogtreecommitdiffstats
path: root/BibTeX.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-07-24 15:27:45 +0000
committerNick Mathewson <nickm@torproject.org>2007-07-24 15:27:45 +0000
commit31d6fdbde709c88d2b2df801af9397ef6cd6c2d1 (patch)
treeb23d2b0691219d7e4a22b0a19f18ed407227d18b /BibTeX.py
parent7f7a729073247cb92668d6945c62d490f91f2cce (diff)
downloadanonbib-31d6fdbde709c88d2b2df801af9397ef6cd6c2d1.tar.gz
r13881@catbus: nickm | 2007-07-24 11:27:40 -0400
Piotr Zelinski has somehow gotten an acute accent on top of one of his consonants. I hear that happens. Fix our code to support that. svn:r241
Diffstat (limited to 'BibTeX.py')
-rw-r--r--BibTeX.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/BibTeX.py b/BibTeX.py
index 2181ba6..a1f45c7 100644
--- a/BibTeX.py
+++ b/BibTeX.py
@@ -624,6 +624,7 @@ ACCENT_MAP = { "'" : 'acute',
'"' : 'uml',
"c" : 'cedil',
}
+UNICODE_MAP = { '&nacute;' : '&#x0144;', }
HTML_LIGATURE_MAP = {
'AE' : '&AElig;',
'ae' : '&aelig;',
@@ -641,7 +642,8 @@ def _unaccent(m):
accent,char = m.groups()
if char[0] == '{':
char = char[1]
- return "&%s%s;" % (char, ACCENT_MAP[accent])
+ accented = "&%s%s;" % (char, ACCENT_MAP[accent])
+ return UNICODE_MAP.get(accented, accented)
def _unlig_html(m):
return "%s%s"%(HTML_LIGATURE_MAP[m.group(1)],m.group(2))
def htmlize(s):