From 88b3048fb362fc83050303a76bf3d4236111f397 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 20 May 2003 18:56:27 +0000 Subject: A better route to non-breaking section names. svn:r15 --- writeHTML.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'writeHTML.py') diff --git a/writeHTML.py b/writeHTML.py index b39348e..c1d6935 100644 --- a/writeHTML.py +++ b/writeHTML.py @@ -19,6 +19,8 @@ def writeBody(f, sections, section_urls): section_urls: map from sectionname to external url''' for s, entries in sections: u = section_urls.get(s) + s = re.sub(r'\s+', ' ', s.strip()) + s = s.replace(" ", " ") if u: print >>f, ('

%s

'%( (BibTeX.url_untranslate(s), u, s))) @@ -38,8 +40,10 @@ def writeHTML(f, sections, sectionType, fieldName, choices, section_urls={}): # secStr = [] for s, _ in sections: + hts = re.sub(r'\s+', ' ', s.strip()) + hts = s.replace(" ", " ") secStr.append("

%s

\n"% - ((BibTeX.url_untranslate(s),s))) + ((BibTeX.url_untranslate(s),hts))) secStr = "".join(secStr) # -- cgit v1.2.3-70-g09d2