mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
* InsetFloat.cpp (getCaption):
- Protect content which has a "]" in subfloat captions. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37416 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
83c06abbc0
commit
4b91536197
@ -490,7 +490,14 @@ docstring InsetFloat::getCaption(OutputParams const & runparams) const
|
||||
otexstream os(ods);
|
||||
ins->getOptArg(os, runparams);
|
||||
ods << '[';
|
||||
ins->getArgument(os, runparams);
|
||||
odocstringstream odss;
|
||||
otexstream oss(odss);
|
||||
ins->getArgument(oss, runparams);
|
||||
docstring arg = odss.str();
|
||||
// Protect ']'
|
||||
if (arg.find(']') != docstring::npos)
|
||||
arg = '{' + arg + '}';
|
||||
ods << arg;
|
||||
ods << ']';
|
||||
return ods.str();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user