Allow MTag to take attributes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33148 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-01-21 21:06:29 +00:00
parent 4a4ec0c96a
commit 7a32a8489a
2 changed files with 8 additions and 2 deletions

View File

@ -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;
}

View File

@ -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 {