count_pars_in_inset: check nested insets

This commit is contained in:
Juergen Spitzmueller 2021-01-27 08:24:17 +01:00
parent a3f591d61e
commit 92f8612ace

View File

@ -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