From c1e79cde53176fb29060cad2b5a387a01cb46198 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sun, 24 Jan 2010 10:32:22 +0000 Subject: [PATCH] revert r30112 (#5988). See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg155843.html git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33191 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Paragraph.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 2e72ff2314..7d1ef37f25 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -2004,8 +2004,10 @@ bool Paragraph::latex(BufferParams const & bparams, unsigned int column = 0; if (body_pos > 0) { - os << '['; - column += 1; + // the optional argument is kept in curly brackets in + // case it contains a ']' + os << "[{"; + column += 2; basefont = getLabelFont(bparams, outerfont); } else { basefont = getLayoutFont(bparams, outerfont); @@ -2051,8 +2053,8 @@ bool Paragraph::latex(BufferParams const & bparams, runparams); runningChange = Change(Change::UNCHANGED); - os << "] "; - column +=2; + os << "}] "; + column +=3; } if (style.isCommand()) { os << '{'; @@ -2245,7 +2247,7 @@ bool Paragraph::latex(BufferParams const & bparams, // Needed if there is an optional argument but no contents. if (body_pos > 0 && body_pos == size()) { - os << "]~"; + os << "}]~"; return_value = false; } -- 2.39.2