From: <mi...@us...> - 2014-06-24 14:53:03
|
Revision: 7753 http://sourceforge.net/p/docutils/code/7753 Author: milde Date: 2014-06-24 14:52:59 +0000 (Tue, 24 Jun 2014) Log Message: ----------- Fix [258] figwidth="image" generates unitless width value. Modified Paths: -------------- trunk/docutils/HISTORY.txt trunk/docutils/docutils/parsers/rst/directives/images.py trunk/docutils/docutils/writers/html4css1/__init__.py Modified: trunk/docutils/HISTORY.txt =================================================================== --- trunk/docutils/HISTORY.txt 2014-06-17 07:32:24 UTC (rev 7752) +++ trunk/docutils/HISTORY.txt 2014-06-24 14:52:59 UTC (rev 7753) @@ -20,6 +20,10 @@ - Update "math" and "csv-table" descriptions. +* docutils/parsers/rst/directives/images.py + + - Fix [258] figwidth="image" generates unitless width value. + * docutils/parsers/rst/states.py - Improve error report when a non-ASCII character is specified as Modified: trunk/docutils/docutils/parsers/rst/directives/images.py =================================================================== --- trunk/docutils/docutils/parsers/rst/directives/images.py 2014-06-17 07:32:24 UTC (rev 7752) +++ trunk/docutils/docutils/parsers/rst/directives/images.py 2014-06-24 14:52:59 UTC (rev 7753) @@ -134,7 +134,7 @@ else: self.state.document.settings.record_dependencies.add( imagepath.replace('\\', '/')) - figure_node['width'] = img.size[0] + figure_node['width'] = '%dpx' % img.size[0] del img elif figwidth is not None: figure_node['width'] = figwidth Modified: trunk/docutils/docutils/writers/html4css1/__init__.py =================================================================== --- trunk/docutils/docutils/writers/html4css1/__init__.py 2014-06-17 07:32:24 UTC (rev 7752) +++ trunk/docutils/docutils/writers/html4css1/__init__.py 2014-06-24 14:52:59 UTC (rev 7753) @@ -1047,9 +1047,9 @@ self.settings.record_dependencies.add( imagepath.replace('\\', '/')) if 'width' not in atts: - atts['width'] = str(img.size[0]) + atts['width'] = '%dpx' % img.size[0] if 'height' not in atts: - atts['height'] = str(img.size[1]) + atts['height'] = '%dpx' % img.size[1] del img for att_name in 'width', 'height': if att_name in atts: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |