From 3926ef7670063de5684d68bd9f59f84dd38424cc Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 23 Nov 2004 22:44:05 +0000 Subject: apply patch from goodell: fix ligatures and allow soft hyphens in URLs svn:r122 --- BibTeX.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BibTeX.py b/BibTeX.py index 5978ccd..2062988 100644 --- a/BibTeX.py +++ b/BibTeX.py @@ -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) -- cgit v1.2.3-70-g09d2