summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-io.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2018-12-04 12:40:43 +0000
committerTavmjong Bah <tavmjong@free.fr>2018-12-04 12:40:43 +0000
commitb0be54c82565f7e476187365ccb6c65d0729810d (patch)
treec0b8133fa3a57934f4b57a5e5aaa5da0697864b0 /src/xml/repr-io.cpp
parentMinor comment/alignment changes. (diff)
downloadinkscape-b0be54c82565f7e476187365ccb6c65d0729810d.tar.gz
inkscape-b0be54c82565f7e476187365ccb6c65d0729810d.zip
Add a few useful lookup functions.
Diffstat (limited to 'src/xml/repr-io.cpp')
-rw-r--r--src/xml/repr-io.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index b1bf26118..c0ebfa12c 100644
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
@@ -981,10 +981,9 @@ void sp_repr_write_stream_element( Node * repr, Writer & out,
}
out.printf( "<%s", element_name );
- // if this is a <text> element, suppress formatting whitespace
+ // If this is a <text> element, suppress formatting whitespace
// for its content and children:
- gchar const *xml_space_attr = repr->attribute("xml:space");
- if (xml_space_attr != nullptr && !strcmp(xml_space_attr, "preserve")) {
+ if (strcmp(repr->name(),"svg:text") == 0) {
add_whitespace = false;
}
@@ -1014,6 +1013,7 @@ void sp_repr_write_stream_element( Node * repr, Writer & out,
break;
}
}
+
if (repr->firstChild()) {
out.writeChar('>');
if (loose && add_whitespace) {