]> git.lyx.org Git - lyx.git/blobdiff - src/sgml.C
fix reading the author field.
[lyx.git] / src / sgml.C
index 6309fa0b2e19a9b038e08f55f650ba279c462269..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)
@@ -115,4 +121,21 @@ int closeTag(ostream & os, Paragraph::depth_type depth,
        return !mixcont;
 }
 
+
+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 != "!-- --") {
+               lines += closeTag(os, total_depth, mixcont, itemtag);
+               if (!environment_inner_depth.empty())
+                       lines += closeTag(os, total_depth, mixcont,
+                               environment_inner_depth);
+       }
+       return lines;
+}
+
+
 } // namespace sgml