summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp')
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp
index b71ac7e8074..743da58b93d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/XMLNode.cpp
@@ -2,7 +2,7 @@
** XMLNode.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2021 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2022 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -107,7 +107,7 @@ void XMLElement::addAttribute (const string &name, const string &value) {
if (Attribute *attr = getAttribute(name))
attr->value = value;
else
- _attributes.emplace_back(Attribute(name, value));
+ _attributes.emplace_back(name, value);
}
@@ -387,12 +387,12 @@ ostream& XMLElement::write (ostream &os) const {
os << '>';
// Insert newlines around children except text nodes. According to the
// SVG specification, pure whitespace nodes are ignored by the SVG renderer.
- if (WRITE_NEWLINES && !_firstChild->toText())
+ if (WRITE_NEWLINES && name() != "text" && !_firstChild->toText())
os << '\n';
for (XMLNode *child = _firstChild.get(); child; child = child->next()) {
child->write(os);
if (!child->toText()) {
- if (WRITE_NEWLINES && (!child->next() || !child->next()->toText()))
+ if (WRITE_NEWLINES && name() != "text" && (!child->next() || !child->next()->toText()))
os << '\n';
}
}