[Python-checkins] r62191 - in doctools/trunk: CHANGES sphinx/htmlwriter.py

georg.brandl python-checkins at python.org
Sun Apr 6 21:05:25 CEST 2008


Author: georg.brandl
Date: Sun Apr  6 21:05:13 2008
New Revision: 62191

Modified:
   doctools/trunk/CHANGES
   doctools/trunk/sphinx/htmlwriter.py
Log:
Don't use os.path for HTML pathnames.


Modified: doctools/trunk/CHANGES
==============================================================================
--- doctools/trunk/CHANGES	(original)
+++ doctools/trunk/CHANGES	Sun Apr  6 21:05:13 2008
@@ -16,6 +16,8 @@
 * sphinx.config: The config file itself can be an extension (if it
   provides a setup() function).
 
+* sphinx.htmlwriter: Don't use os.path for joining image HREFs.
+
 
 Release 0.1.61950 (Mar 26, 2008)
 ================================

Modified: doctools/trunk/sphinx/htmlwriter.py
==============================================================================
--- doctools/trunk/sphinx/htmlwriter.py	(original)
+++ doctools/trunk/sphinx/htmlwriter.py	Sun Apr  6 21:05:13 2008
@@ -10,7 +10,7 @@
 """
 
 import sys
-from os import path
+import posixpath
 
 from docutils import nodes
 from docutils.writers.html4css1 import Writer, HTMLTranslator as BaseTranslator
@@ -252,8 +252,8 @@
         olduri = node['uri']
         # rewrite the URI if the environment knows about it
         if olduri in self.builder.env.images:
-            node['uri'] = path.join(self.builder.imgpath,
-                                    self.builder.env.images[olduri][1])
+            node['uri'] = posixpath.join(self.builder.imgpath,
+                                         self.builder.env.images[olduri][1])
         BaseTranslator.visit_image(self, node)
 
     def visit_toctree(self, node):


More information about the Python-checkins mailing list