X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLayoutFile.cpp;h=8cca663c4b6ace8e872ace70304b801e2074afee;hb=c3acdb9c7c7395bd299317ecab82b8076203ace2;hp=d0fc248ee9f27cca309387873f5ab54b8a097c6b;hpb=306b136cc005a1aeb9a6861ee0ac6fe2a2dd53e3;p=lyx.git diff --git a/src/LayoutFile.cpp b/src/LayoutFile.cpp index d0fc248ee9..8cca663c4b 100644 --- a/src/LayoutFile.cpp +++ b/src/LayoutFile.cpp @@ -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;