]> git.lyx.org Git - features.git/commitdiff
Fix logic error that led to bug #8777. I have no idea what I was
authorRichard Heck <rgheck@lyx.org>
Sat, 20 Jul 2013 13:56:34 +0000 (09:56 -0400)
committerRichard Heck <rgheck@lyx.org>
Sat, 20 Jul 2013 13:56:34 +0000 (09:56 -0400)
previously thinking.

src/insets/InsetCaption.cpp

index ac6624f0055e1fd6bcb2c236dc453b1410ff8805..aaf06286f9abf3ee1f685b9b52ae5496d1f4e32b 100644 (file)
@@ -316,7 +316,9 @@ docstring InsetCaption::xhtml(XHTMLStream & xs, OutputParams const & rp) const
                string const our_class = "float-caption-" + type_;
                size_t const loc = attr.find("class='");
                if (loc != string::npos)
-                       attr.insert(loc + 1, our_class);
+                       attr.insert(loc + 7, our_class+ " ");
+               else
+                       attr = attr + " class='" + our_class + "'";
        }
        xs << html::StartTag(tag, attr);
        docstring def = getCaptionAsHTML(xs, rp);