]> git.lyx.org Git - lyx.git/commitdiff
Fix bug #10320.
authorRichard Heck <rgheck@lyx.org>
Thu, 4 Aug 2016 21:45:10 +0000 (17:45 -0400)
committerRichard Heck <rgheck@lyx.org>
Thu, 4 Aug 2016 21:45:40 +0000 (17:45 -0400)
Layout::write needs to allow for the possility that the name of the
style may contain a space. It seems sufficient just always to quote it.

src/Layout.cpp

index db8c317764797306dd098b7e58958c7b05c9b9d9..d6a01c9f7cb12adbd94cef4ffa9352828d532a6f 100644 (file)
@@ -1089,7 +1089,7 @@ void writeArgument(ostream & os, string const & id, Layout::latexarg const & arg
 
 void Layout::write(ostream & os) const
 {
-       os << "Style " << to_utf8(name_) << '\n';
+       os << "Style \"" << to_utf8(name_) << "\"\n";
        if (!category_.empty() && obsoleted_by_.empty())
                os << "\tCategory \"" << to_utf8(category_) << "\"\n";
        // Can't deduce Copystyle here :-(