diff options
| author | Nick Mathewson <nickm@torproject.org> | 2004-11-23 22:44:05 +0000 |
|---|---|---|
| committer | Nick Mathewson <nickm@torproject.org> | 2004-11-23 22:44:05 +0000 |
| commit | 3926ef7670063de5684d68bd9f59f84dd38424cc (patch) | |
| tree | 4196011930c3223791883b3d0647f754f7ec1a3a /BibTeX.py | |
| parent | 7e92fc0b861c7551fb05898c15bd615dbbb50e46 (diff) | |
| download | anonbib-3926ef7670063de5684d68bd9f59f84dd38424cc.tar.gz | |
apply patch from goodell: fix ligatures and allow soft hyphens in URLs
svn:r122
Diffstat (limited to 'BibTeX.py')
| -rw-r--r-- | BibTeX.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -564,6 +564,7 @@ class BibTeXEntry: def unTeXescapeURL(s): """Turn a URL as formatted in TeX into a real URL.""" s = s.replace("\\_", "_") + s = s.replace("\\-", "") s = s.replace("\{}", "") s = s.replace("{}", "") return s @@ -610,8 +611,8 @@ def htmlize(s): s = RE_LONE_AMP.sub(lambda m: "&%s" % m.group(1), s) s = RE_LONE_I.sub(lambda m: "i%s" % m.group(1), s) s = RE_ACCENT.sub(_unaccent, s) - s = RE_LIGATURE.sub(_unlig_html, s); s = unTeXescapeURL(s) + s = RE_LIGATURE.sub(_unlig_html, s); s = RE_TEX_CMD.sub("", s) s = s.translate(ALLCHARS, "{}") s = RE_PAGE_SPAN.sub(lambda m: "%s-%s"%(m.groups()), s) |
