]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/math.C
Bug fix; ensure that all is Ok after the combox is moved with
[lyx.git] / src / tex2lyx / math.C
index 5e84b5d50dc23f25d6a45a2b92ada7720e3b73a8..ea3cc9d4e03374e0718bf74127466452b611aa73 100644 (file)
@@ -100,7 +100,6 @@ void parse_math(Parser & p, ostream & os, unsigned flags, const mode_type mode)
                }
 
                else if (t.cat() == catLetter ||
-                              t.cat() == catSpace ||
                               t.cat() == catSuper ||
                               t.cat() == catSub ||
                               t.cat() == catOther ||
@@ -109,15 +108,6 @@ void parse_math(Parser & p, ostream & os, unsigned flags, const mode_type mode)
                               t.cat() == catParameter)
                        os << t.character();
 
-               else if (t.cat() == catNewline) {
-                       //if (p.next_token().cat() == catNewline) {
-                       //      p.get_token();
-                       //      handle_par(os);
-                       //} else {
-                               os << "\n "; // note the space
-                       //}
-               }
-
                else if (t.cat() == catBegin) {
                        os << '{';
                        parse_math(p, os, FLAG_BRACE_LAST, mode);
@@ -130,8 +120,13 @@ void parse_math(Parser & p, ostream & os, unsigned flags, const mode_type mode)
                        os << "unexpected '}' in math\n";
                }
 
-               else if (t.cat() == catComment)
-                       handle_comment(p);
+               else if (t.cat() == catComment) {
+                       if (!t.cs().empty())
+                               cerr << "Ignoring comment: " << t.asInput();
+                       else
+                               // "%\n" combination
+                               p.skip_spaces();
+               }
 
                //
                // control sequences