]> git.lyx.org Git - lyx.git/blobdiff - src/sgml.C
fix reading the author field.
[lyx.git] / src / sgml.C
index bd1734976012946068d6ad7b3acb49a293bf7ca4..574bd1d124b3a487eb9a73658778a846c414c3c5 100644 (file)
@@ -46,6 +46,7 @@ pair<bool, string> escapeChar(char c)
        case '>':
                str = "&gt;";
                break;
+#if 0
        case '$':
                str = "&dollar;";
                break;
@@ -76,6 +77,7 @@ pair<bool, string> escapeChar(char c)
        case '\\':
                str = "&bsol;";
                break;
+#endif
        default:
                str = c;
                break;
@@ -85,12 +87,16 @@ pair<bool, string> 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)
@@ -118,13 +124,13 @@ int closeTag(ostream & os, Paragraph::depth_type depth,
 
 unsigned int closeEnvTags(ostream & os, bool mixcont,
                        string const & environment_inner_depth,
+                       string const & itemtag,
                        lyx::depth_type total_depth)
 {
        unsigned int lines = 0;
        if (environment_inner_depth != "!-- --") {
-               string item_name= "listitem";
-               lines += closeTag(os, total_depth, mixcont, item_name);
-               if (environment_inner_depth == "varlistentry")
+               lines += closeTag(os, total_depth, mixcont, itemtag);
+               if (!environment_inner_depth.empty())
                        lines += closeTag(os, total_depth, mixcont,
                                environment_inner_depth);
        }