]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/Parser.cpp
Collapsable -> Collapsible (part 5)
[lyx.git] / src / tex2lyx / Parser.cpp
index 69e3460f459de17c1ccc6f15b564eeac8589af69..ec63b77da83e7c063724746427fa64be8c0c127e 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "Encoding.h"
 #include "Parser.h"
-#include "support/foreach.h"
 #include "support/lstrings.h"
 #include "support/textutils.h"
 
@@ -49,7 +48,7 @@ char_type getNewline(iparserdocstream & is, char_type c)
        return c;
 }
 
-}
+} // namespace
 
 //
 // Token
@@ -162,6 +161,7 @@ Parser::Parser(idocstream & is, std::string const & fixedenc)
 {
        if (fixed_enc_)
                is_.setEncoding(fixedenc);
+       catInit();
 }
 
 
@@ -173,6 +173,7 @@ Parser::Parser(string const & s)
          // An idocstringstream can not change the encoding
          fixed_enc_(true)
 {
+       catInit();
 }
 
 
@@ -338,7 +339,7 @@ Token const Parser::get_token()
                if (pos_ >= tokens_.size())
                        return dummy;
        }
-       // cerr << "looking at token " << tokens_[pos_] 
+       // cerr << "looking at token " << tokens_[pos_]
        //      << " pos: " << pos_ << '\n';
        return tokens_[pos_++];
 }
@@ -661,7 +662,7 @@ Parser::Arg Parser::verbatimStuff(string const & end_string, bool const allow_li
                                return Arg(false, string());
                        }
                        if (match_index) {
-                               oss << end_string.substr(0, match_index) 
+                               oss << end_string.substr(0, match_index)
                                    << t.asInput();
                                match_index = 0;
                        } else