]> git.lyx.org Git - lyx.git/commitdiff
allow linebreak in argument delimiter string
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 30 Nov 2012 08:13:38 +0000 (09:13 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 30 Nov 2012 08:13:38 +0000 (09:13 +0100)
lib/doc/Customization.lyx
src/Layout.cpp
src/insets/InsetLayout.cpp

index 52abb0be78b655d2a7f729ef20ec3a79c36062ad..7320540dc5d507b158ed1e684accd3d398fe637d 100644 (file)
@@ -10583,7 +10583,7 @@ Argument 2
 
 \begin_layout Itemize
 
-\change_inserted -712698321 1353681145
+\change_inserted -712698321 1354263104
 \begin_inset Flex Code
 status collapsed
 
@@ -10638,11 +10638,26 @@ status collapsed
 \end_inset
 
 ).
+ A line break in the output can be indicated by 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354263104
+<br/>
+\end_layout
+
+\end_inset
+
+.
+\change_unchanged
+
 \end_layout
 
 \begin_layout Itemize
 
-\change_inserted -712698321 1353917319
+\change_inserted -712698321 1354263106
 \begin_inset Flex Code
 status collapsed
 
@@ -10691,6 +10706,21 @@ status collapsed
 \end_inset
 
 ).
+ A line break in the output can be indicated by 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354263106
+<br/>
+\end_layout
+
+\end_inset
+
+.
+\change_unchanged
+
 \end_layout
 
 \begin_layout Itemize
@@ -12642,7 +12672,7 @@ depending upon the LaTeX type.
 \end_deeper
 \begin_layout Description
 
-\change_inserted -712698321 1353866861
+\change_inserted -712698321 1354263086
 \begin_inset Flex Code
 status collapsed
 
@@ -12667,6 +12697,21 @@ string
 \end_inset
 
 ] A string that is put at the beginning of the style content.
+ A line break in the output can be indicated by 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354263086
+<br/>
+\end_layout
+
+\end_inset
+
+.
+\change_unchanged
+
 \end_layout
 
 \begin_layout Description
@@ -13671,7 +13716,7 @@ CopyStyle
 
 \begin_layout Description
 
-\change_inserted -712698321 1353866881
+\change_inserted -712698321 1354263074
 \begin_inset Flex Code
 status collapsed
 
@@ -13696,6 +13741,21 @@ string
 \end_inset
 
 ] A string that is put at the end of the layout content.
+ A line break in the output can be indicated by 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354263069
+<br/>
+\change_unchanged
+
+\end_layout
+
+\end_inset
+
+.
 \end_layout
 
 \begin_layout Description
@@ -16792,7 +16852,7 @@ depending upon the LaTeX type.
 \end_deeper
 \begin_layout Description
 
-\change_inserted -712698321 1353866797
+\change_inserted -712698321 1354263128
 \begin_inset Flex Code
 status collapsed
 
@@ -16819,7 +16879,20 @@ string
 \end_inset
 
 ] A string that is put at the beginning of the layout content.
-\change_inserted 155139281 1354130509
+ A line break in the output can be indicated by 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354263128
+<br/>
+\end_layout
+
+\end_inset
+
+.
+\change_unchanged
 
 \end_layout
 
@@ -17292,7 +17365,7 @@ status collapsed
 
 \begin_layout Description
 
-\change_inserted -712698321 1353866814
+\change_inserted -712698321 1354263134
 \begin_inset Flex Code
 status collapsed
 
@@ -17317,6 +17390,19 @@ string
 \end_inset
 
 ] A string that is put at the end of the layout content.
+ A line break in the output can be indicated by 
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\change_inserted -712698321 1354263134
+<br/>
+\end_layout
+
+\end_inset
+
+.
 \change_unchanged
 
 \end_layout
index 95cb28bdbea65c3d9dd7387718e6d94ad47d37e6..2ff77edafcb82ef36e2dea01e762f576441cc779 100644 (file)
@@ -372,10 +372,14 @@ bool Layout::read(Lexer & lex, TextClass const & tclass)
 
                case LT_LEFTDELIM:
                        lex >> leftdelim_;
+                       leftdelim_ = support::subst(leftdelim_, from_ascii("<br/>"),
+                                                   from_ascii("\n"));
                        break;
 
                case LT_RIGHTDELIM:
                        lex >> rightdelim_;
+                       rightdelim_ = support::subst(rightdelim_, from_ascii("<br/>"),
+                                                    from_ascii("\n"));
                        break;
 
                case LT_INNERTAG:
@@ -902,9 +906,13 @@ void Layout::readArgument(Lexer & lex)
                } else if (tok == "leftdelim") {
                        lex.next();
                        arg.ldelim = lex.getDocString();
+                       arg.ldelim = support::subst(arg.ldelim, from_ascii("<br/>"),
+                                                   from_ascii("\n"));
                } else if (tok == "rightdelim") {
                        lex.next();
                        arg.rdelim = lex.getDocString();
+                       arg.rdelim = support::subst(arg.rdelim, from_ascii("<br/>"),
+                                                   from_ascii("\n"));
                } else if (tok == "tooltip") {
                        lex.next();
                        arg.tooltip = lex.getDocString();
index aa9672e96dbd8377952c05a639d9e37650886af1..0d9e88e909064e95bbcb40f4edfb01e366248e51 100644 (file)
@@ -237,12 +237,16 @@ bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
                        break;
                case IL_LEFTDELIM:
                        lex >> leftdelim_;
+                       leftdelim_ = support::subst(leftdelim_, from_ascii("<br/>"),
+                                                   from_ascii("\n"));
                        break;
                case IL_FORCE_LOCAL_FONT_SWITCH:
                        lex >> forcelocalfontswitch_;
                        break;
                case IL_RIGHTDELIM:
                        lex >> rightdelim_;
+                       rightdelim_ = support::subst(rightdelim_, from_ascii("<br/>"),
+                                                    from_ascii("\n"));
                        break;
                case IL_LABELFONT:
                        labelfont_ = lyxRead(lex, inherit_font);
@@ -522,9 +526,13 @@ void InsetLayout::readArgument(Lexer & lex)
                } else if (tok == "leftdelim") {
                        lex.next();
                        arg.ldelim = lex.getDocString();
+                       arg.ldelim = support::subst(arg.ldelim,
+                                                   from_ascii("<br/>"), from_ascii("\n"));
                } else if (tok == "rightdelim") {
                        lex.next();
                        arg.rdelim = lex.getDocString();
+                       arg.rdelim = support::subst(arg.rdelim,
+                                                   from_ascii("<br/>"), from_ascii("\n"));
                } else if (tok == "tooltip") {
                        lex.next();
                        arg.tooltip = lex.getDocString();