From: Richard Heck Date: Thu, 21 Jan 2010 21:06:29 +0000 (+0000) Subject: Allow MTag to take attributes. X-Git-Tag: 2.0.0~4276 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7a32a8489afcdb60e0e93ed97984a16bf3a87035;p=features.git Allow MTag to take attributes. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33148 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/MathStream.cpp b/src/mathed/MathStream.cpp index 793da37ec5..9c8ebeb2a2 100644 --- a/src/mathed/MathStream.cpp +++ b/src/mathed/MathStream.cpp @@ -315,7 +315,10 @@ MathStream & operator<<(MathStream & ms, MTag const & t) { ++ms.tab(); ms.cr(); - ms.os() << '<' << from_ascii(t.tag_) << '>'; + ms.os() << '<' << from_ascii(t.tag_); + if (!t.attr_.empty()) + ms.os() << " " << from_ascii(t.attr_); + ms << '>'; return ms; } diff --git a/src/mathed/MathStream.h b/src/mathed/MathStream.h index 99900c3c11..78b77b780a 100644 --- a/src/mathed/MathStream.h +++ b/src/mathed/MathStream.h @@ -229,9 +229,12 @@ private: class MTag { public: /// - MTag(char const * const tag) : tag_(tag) {} + MTag(char const * const tag, std::string attr = "") + : tag_(tag), attr_(attr) {} /// char const * const tag_; + /// + std::string attr_; }; class ETag {