]> git.lyx.org Git - lyx.git/blobdiff - src/LayoutFile.cpp
Merge branch 'master' of git.lyx.org:lyx
[lyx.git] / src / LayoutFile.cpp
index d0fc248ee9f27cca309387873f5ab54b8a097c6b..8cca663c4b6ace8e872ace70304b801e2074afee 100644 (file)
@@ -301,9 +301,9 @@ LayoutFileIndex  LayoutFileList::addLocalLayout(
        // which uses the following regex
        //     \Declare(LaTeX|DocBook)Class\s*(\[([^,]*)(,.*)*\])*\s*{(.*)}
        ifstream ifs(layout_file.toFilesystemEncoding().c_str());
-       static regex const reg("^#\\s*\\\\Declare(LaTeX|DocBook)Class\\s*"
+       static regex const reg("^\\s*#\\s*\\\\Declare(LaTeX|DocBook)Class\\s*"
                "(?:\\[([^,]*)(?:,.*)*\\])*\\s*\\{(.*)\\}\\s*");
-       static regex const catreg("^#\\s*\\\\DeclareCategory\\{(.*)\\}");
+       static regex const catreg("^\\s*#\\s*\\\\DeclareCategory\\{(.*)\\}\\s*");
        string line;
        string class_name;
        string class_prereq;