mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
XML: improve formatting of error message for unrecognised tag type.
Before, there was always a space after the tag, even when there were no attributes. Now, the space is output conditionally, so that the output makes more sense. Before, one space too many for the tag name (title), casting doubt on whether the code had this space hard coded or not: <!-- Output Error: Unrecognised tag type 'para' for 'title ' --> After, no such space: <!-- Output Error: Unrecognised tag type 'para' for 'title' -->
This commit is contained in:
parent
43d096f647
commit
4f314567b6
@ -812,7 +812,8 @@ void xml::openTag(XMLStream & xs, const docstring & tag, const docstring & attr,
|
|||||||
else if (tagtype == "none")
|
else if (tagtype == "none")
|
||||||
xs << xml::StartTag(tag, attr);
|
xs << xml::StartTag(tag, attr);
|
||||||
else
|
else
|
||||||
xs.writeError("Unrecognised tag type '" + tagtype + "' for '" + to_utf8(tag) + " " + to_utf8(attr) + "'");
|
xs.writeError("Unrecognised tag type '" + tagtype + "' for '" + to_utf8(tag) + (attr.empty() ? "" : " ") +
|
||||||
|
to_utf8(attr) + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user