[LyX/master] count_pars_in_inset: check nested insets
Juergen Spitzmueller
spitz at lyx.org
Wed Jan 27 07:22:48 UTC 2021
commit 92f8612acec0db29e6d0d8c171da9467dd834079
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Wed Jan 27 08:24:17 2021 +0100
count_pars_in_inset: check nested insets
---
lib/lyx2lyx/parser_tools.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/lyx2lyx/parser_tools.py b/lib/lyx2lyx/parser_tools.py
index 7b7fcfa..895a4cd 100644
--- a/lib/lyx2lyx/parser_tools.py
+++ b/lib/lyx2lyx/parser_tools.py
@@ -689,7 +689,7 @@ def count_pars_in_inset(lines, i):
pars = 0
for j in range(ins[1], ins[2]):
m = re.match(r'\\begin_layout (.*)', lines[j])
- if m and get_containing_inset(lines, j)[0] == ins[0]:
+ if m and get_containing_inset(lines, j)[1] == ins[1]:
pars += 1
return pars
More information about the lyx-cvs
mailing list