mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
Honor paragraph parameters when converting chunk layouts.
Fixes: #9320.
This commit is contained in:
parent
3040adf765
commit
821c09668a
@ -4621,10 +4621,23 @@ def convert_chunks(document):
|
|||||||
# We have stripped everything. This can be deleted.
|
# We have stripped everything. This can be deleted.
|
||||||
contents.pop(0)
|
contents.pop(0)
|
||||||
|
|
||||||
newstuff = ['\\begin_layout Standard',
|
newstuff = ['\\begin_layout Standard']
|
||||||
'\\begin_inset Flex Chunk',
|
|
||||||
'status open', '',
|
# Maintain paragraph parameters
|
||||||
'\\begin_layout Plain Layout', '']
|
par_params = ["\\noindent", "\\indent", "\\indent-toggle", "\\leftindent",
|
||||||
|
"\\start_of_appendix", "\\paragraph_spacing", "\\align",
|
||||||
|
"\\labelwidthstring"]
|
||||||
|
parms = start + 1
|
||||||
|
while True:
|
||||||
|
if document.body[parms].split(' ', 1)[0] not in par_params:
|
||||||
|
break
|
||||||
|
newstuff.extend([document.body[parms]])
|
||||||
|
parms += 1
|
||||||
|
|
||||||
|
newstuff.extend(
|
||||||
|
['\\begin_inset Flex Chunk',
|
||||||
|
'status open', '',
|
||||||
|
'\\begin_layout Plain Layout', ''])
|
||||||
|
|
||||||
# If we have a non-empty optional argument, insert it.
|
# If we have a non-empty optional argument, insert it.
|
||||||
if match and optarg != "":
|
if match and optarg != "":
|
||||||
|
Loading…
Reference in New Issue
Block a user