From 059cab71c68a3fbee36f60e8208d4a47d11c6b60 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 26 Aug 2021 03:02:29 +0000 Subject: CTAN sync 202108260302 --- dviware/dvisvgm/src/XMLNode.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dviware/dvisvgm/src/XMLNode.cpp') diff --git a/dviware/dvisvgm/src/XMLNode.cpp b/dviware/dvisvgm/src/XMLNode.cpp index eb49b9c9db..8549593a13 100644 --- a/dviware/dvisvgm/src/XMLNode.cpp +++ b/dviware/dvisvgm/src/XMLNode.cpp @@ -2,7 +2,7 @@ ** XMLNode.cpp ** ** ** ** This file is part of dvisvgm -- a fast DVI to SVG converter ** -** Copyright (C) 2005-2020 Martin Gieseking ** +** Copyright (C) 2005-2021 Martin Gieseking ** ** ** ** 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'; } } -- cgit v1.2.3