X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsgml.C;h=7ebaf187a694782a4d7f21052c1fc83b7372b79a;hb=67f9c9fdae42211aa3ff8d0c6f62485bd721d8eb;hp=7d6c00a3acbafc81f454d8d6d9d997f221e7f6cf;hpb=a3236d4c959035766701d5c2f1c6a5f3dd3c31ca;p=lyx.git diff --git a/src/sgml.C b/src/sgml.C index 7d6c00a3ac..7ebaf187a6 100644 --- a/src/sgml.C +++ b/src/sgml.C @@ -85,12 +85,16 @@ pair escapeChar(char c) int openTag(ostream & os, Paragraph::depth_type depth, - bool mixcont, string const & latexname) + bool mixcont, string const & latexname, + string const & latexparam) { if (!latexname.empty() && latexname != "!-- --") { if (!mixcont) os << string(depth, ' '); - os << '<' << latexname << '>'; + os << '<' << latexname; + if (!latexparam.empty()) + os << " " << latexparam; + os << '>'; } if (!mixcont) @@ -116,16 +120,16 @@ int closeTag(ostream & os, Paragraph::depth_type depth, } -unsigned int closeEnvTags(ostream & ofs, bool mixcont, +unsigned int closeEnvTags(ostream & os, bool mixcont, string const & environment_inner_depth, + string const & itemtag, lyx::depth_type total_depth) { - unsigned int lines; + unsigned int lines = 0; if (environment_inner_depth != "!-- --") { - string item_name= "listitem"; - lines += closeTag(ofs, total_depth, mixcont, item_name); - if (environment_inner_depth == "varlistentry") - lines += closeTag(ofs, total_depth, mixcont, + lines += closeTag(os, total_depth, mixcont, itemtag); + if (!environment_inner_depth.empty()) + lines += closeTag(os, total_depth, mixcont, environment_inner_depth); } return lines;