]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/table.cpp
FindAdv: Comments
[lyx.git] / src / tex2lyx / table.cpp
index 01c7a541780e4d661628a1985c89fe243917a777..b6d4bac84258c3c6c37cb5e6129204ea1189dcb5 100644 (file)
@@ -432,7 +432,7 @@ void handle_colalign(Parser & p, vector<ColInfo> & colinfo,
                                                next.special += '|';
                                } else if (colinfo.back().special.empty())
                                        ++colinfo.back().rightlines;
-                               else if (next.special.empty())
+                               else if (next.special.empty() && p.next_token().cat() != catEnd)
                                        ++next.leftlines;
                                else
                                        colinfo.back().special += '|';
@@ -496,14 +496,14 @@ void handle_colalign(Parser & p, vector<ColInfo> & colinfo,
                        case '@':
                                // text instead of the column spacing
                        case '!': {
-                                       // text in addition to the column spacing
-                                       string const arg =  p.verbatim_item();
-                                       next.special += t.character();
-                                       next.special += '{' + arg + '}';
-                                       string const sarg = arg.size() > 2 ? arg.substr(0, arg.size() - 1) : string();
-                                       if (t.character() == '@' && sarg == "\\extracolsep{0pt}")
-                                               next.decimal_point = arg.back();
-                                       break;
+                               // text in addition to the column spacing
+                               string const arg =  p.verbatim_item();
+                               next.special += t.character();
+                               next.special += '{' + arg + '}';
+                               string const sarg = arg.size() > 2 ? arg.substr(0, arg.size() - 1) : string();
+                               if (t.character() == '@' && sarg == "\\extracolsep{0pt}")
+                                       next.decimal_point = arg.back();
+                               break;
                        }
                        default: {
                                // try user defined column types