mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
XML: use the new mechanisms for CR detection with errors.
This helps tracking down line problems even in the presence of errors.
This commit is contained in:
parent
52b2d3f683
commit
bfc67c59b4
12
src/xml.cpp
12
src/xml.cpp
@ -167,17 +167,21 @@ bool FontTag::operator==(StartTag const & tag) const
|
||||
} // namespace xml
|
||||
|
||||
|
||||
void XMLStream::writeError(std::string const &s) const
|
||||
void XMLStream::writeError(std::string const &s)
|
||||
{
|
||||
LYXERR0(s);
|
||||
os_ << from_utf8("<!-- Output Error: " + s + " -->\n");
|
||||
*this << ESCAPE_NONE << from_utf8("<!-- Output Error: " + s + " -->");
|
||||
*this << xml::CR();
|
||||
}
|
||||
|
||||
|
||||
void XMLStream::writeError(docstring const &s) const
|
||||
void XMLStream::writeError(docstring const &s)
|
||||
{
|
||||
LYXERR0(s);
|
||||
os_ << from_utf8("<!-- Output Error: ") << s << from_utf8(" -->\n");
|
||||
*this << ESCAPE_NONE << from_utf8("<!-- Output Error: ");
|
||||
*this << s;
|
||||
*this << ESCAPE_NONE << from_utf8(" -->");
|
||||
*this << xml::CR();
|
||||
}
|
||||
|
||||
|
||||
|
@ -103,9 +103,13 @@ public:
|
||||
/// that simplifies the logic using this code.
|
||||
bool isLastTagCR() const { return is_last_tag_cr_; };
|
||||
///
|
||||
void writeError(std::string const &) const;
|
||||
void writeError(std::string const &);
|
||||
///
|
||||
void writeError(docstring const &) const;
|
||||
void writeError(docstring const &);
|
||||
///
|
||||
typedef std::shared_ptr<xml::StartTag> TagPtr;
|
||||
/// Returns the last element on the tag stack. XMLStream keeps ownership of the item.
|
||||
TagPtr getLastStackTag();
|
||||
private:
|
||||
///
|
||||
void clearTagDeque();
|
||||
|
Loading…
Reference in New Issue
Block a user