How did I forget to do that?!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29969 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-06-05 19:52:22 +00:00
parent 68fe5341e3
commit c7d0862a94
2 changed files with 6 additions and 7 deletions

View File

@ -68,7 +68,7 @@ docstring escapeChar(char_type c)
// FIXME This needs to be protected somehow.
static vector<string> taglist;
bool openTag(odocstream & os, string tag, string attr)
bool openTag(odocstream & os, string const & tag, string const & attr)
{
if (tag.empty())
return false;
@ -78,15 +78,13 @@ bool openTag(odocstream & os, string tag, string attr)
if (tag == "p")
if (find(taglist.begin(), taglist.end(), "p") != taglist.end())
return false;
if (!attr.empty())
attr = ' ' + attr;
os << from_ascii("<" + tag + attr + ">");
os << from_ascii("<" + tag + (attr.empty() ? "" : " " + attr) + ">");
taglist.push_back(tag);
return true;
}
bool closeTag(odocstream & os, string tag)
bool closeTag(odocstream & os, string const & tag)
{
if (tag.empty())
return false;

View File

@ -30,9 +30,10 @@ namespace html {
///
docstring escapeChar(char_type c);
/// \return true if tag was opened, false if not
bool openTag(odocstream & os, std::string tag, std::string attr);
bool openTag(odocstream & os, std::string const & tag,
std::string const & attr);
/// \return true if tag was opened, false if not
bool closeTag(odocstream & os, std::string tag);
bool closeTag(odocstream & os, std::string const & tag);
}
} // namespace lyx