summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ef9ea67)
raw | patch | inline | side by side (parent: ef9ea67)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 10 Feb 2007 20:39:52 +0000 (20:39 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 10 Feb 2007 20:39:52 +0000 (20:39 +0000) |
src/sp-string.cpp | patch | blob | history |
diff --git a/src/sp-string.cpp b/src/sp-string.cpp
index ddea5abc7ed60bb1b0cdda4abdf8cfb5b6ef2c2b..871338ad599ef44c0990f42b462182863cad18c3 100644 (file)
--- a/src/sp-string.cpp
+++ b/src/sp-string.cpp
if (object->xml_space.value == SP_XML_SPACE_PRESERVE) {
for ( ; *xml_string ; xml_string = g_utf8_next_char(xml_string) ) {
gunichar c = g_utf8_get_char(xml_string);
- if (c == '\n' || c == '\t') c = ' ';
+ if (c == 0xa || c == 0xd || c == '\t') c = ' ';
string->string += c;
}
}
bool whitespace = false;
for ( ; *xml_string ; xml_string = g_utf8_next_char(xml_string) ) {
gunichar c = g_utf8_get_char(xml_string);
- if (c == '\n') continue;
+ if (c == 0xa || c == 0xd) continue;
if (c == ' ' || c == '\t') whitespace = true;
else {
if (whitespace && (!string->string.empty() || SP_OBJECT_PREV(object) != NULL))