summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2011-12-20 06:10:43 +0000
committerJazzyNico <nicoduf@yahoo.fr>2011-12-20 06:10:43 +0000
commit15635a61a0b78e7e4ff4f446e262a175039ad5a6 (patch)
tree6123d34dc0071531a01a28d12a5c9dd2f96aac78 /share
parentUI. Patch for wishlist Bug #169623 (Canvas color option) by William Swanson. (diff)
downloadinkscape-15635a61a0b78e7e4ff4f446e262a175039ad5a6.tar.gz
inkscape-15635a61a0b78e7e4ff4f446e262a175039ad5a6.zip
Extensions. Optimized SVG output update from upstream.
(bzr r10785)
Diffstat (limited to 'share')
-rw-r--r--[-rwxr-xr-x]share/extensions/scour.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/share/extensions/scour.py b/share/extensions/scour.py
index 88a65cb39..a3a8a7487 100755..100644
--- a/share/extensions/scour.py
+++ b/share/extensions/scour.py
@@ -70,7 +70,7 @@ except ImportError:
pass
APP = 'scour'
-VER = '0.25'
+VER = '0.26'
COPYRIGHT = 'Copyright Jeff Schiller, Louis Simard, 2010'
NS = { 'SVG': 'http://www.w3.org/2000/svg',
@@ -2125,10 +2125,13 @@ def parseListOfPoints(s):
# we got negative coords
else:
for j in xrange(len(negcoords)):
- # first number could be positive
if j == 0:
+ # first number could be positive
if negcoords[0] != '':
nums.append(negcoords[0])
+ # but it could also be negative
+ elif len(nums) == 0:
+ nums.append('-' + negcoords[j])
# otherwise all other strings will be negative
else:
# unless we accidentally split a number that was in scientific notation
@@ -2554,9 +2557,9 @@ def removeComments(element) :
# must process the document object separately, because its
# documentElement's nodes have None as their parentNode
for subelement in element.childNodes:
- if isinstance(element, xml.dom.minidom.Comment):
- numCommentBytes += len(element.data)
- element.documentElement.removeChild(subelement)
+ if isinstance(subelement, xml.dom.minidom.Comment):
+ numCommentBytes += len(subelement.data)
+ element.removeChild(subelement)
else:
removeComments(subelement)
elif isinstance(element, xml.dom.minidom.Comment):