From 42c51e7169ee86948a620d9e2255c264a504f82c Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 25 Nov 2014 17:47:14 +0100 Subject: [PATCH] Fix conversion of beamer block titles when the language is switched at the beginning of the title --- lib/lyx2lyx/lyx_2_1.py | 4 ++++ status.21x | 3 +++ 2 files changed, 7 insertions(+) diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index e6d0bdca5b..2d523dbcfd 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -3070,6 +3070,10 @@ def convert_beamerblocks(document): parend = parent[2] j = parend if i != -1: + # If the paragraph starts with a language switch, adjust parbeg + if len(document.body[parbeg]) == 0 and parbeg < parend \ + and document.body[parbeg + 1].startswith("\\lang"): + parbeg += 2 if document.body[parbeg] == "\\begin_inset ERT": ertcontfirstline = parbeg + 5 lastertbeg = -1 diff --git a/status.21x b/status.21x index 9ece51d7e9..5f87cc5600 100644 --- a/status.21x +++ b/status.21x @@ -105,6 +105,9 @@ What's new - Fix import of chunk insets containing newlines (bug 9300). +- Fix import of ERT beamer block titles which are preceeded by a + language switch. + * USER INTERFACE -- 2.39.5