mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Change the passthru conversion routine again.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37833 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4620034eda
commit
74245321ca
@ -2083,13 +2083,11 @@ def convert_passthru(document):
|
|||||||
# by new instances of this layout. so we have repeated layouts
|
# by new instances of this layout. so we have repeated layouts
|
||||||
# instead of newlines.
|
# instead of newlines.
|
||||||
|
|
||||||
# first, though, we need to find out if the paragraph has any
|
# if the paragraph has any customization, however, we do not want to
|
||||||
# customization, so those can be propogated.
|
# do the replacement.
|
||||||
custom = []
|
if document.body[beg + 1].startswith("\\"):
|
||||||
i = beg + 1
|
beg = end + 1
|
||||||
while document.body[i].startswith("\\"):
|
continue
|
||||||
custom.append(document.body[i])
|
|
||||||
i += 1
|
|
||||||
|
|
||||||
ns = beg
|
ns = beg
|
||||||
while True:
|
while True:
|
||||||
@ -2103,11 +2101,11 @@ def convert_passthru(document):
|
|||||||
continue
|
continue
|
||||||
if document.body[ne + 1] == "":
|
if document.body[ne + 1] == "":
|
||||||
ne += 1
|
ne += 1
|
||||||
subst = ["\\end_layout", "", "\\begin_layout " + lay] + custom
|
subst = ["\\end_layout", "", "\\begin_layout " + lay]
|
||||||
document.body[ns:ne + 1] = subst
|
document.body[ns:ne + 1] = subst
|
||||||
# now we need to adjust end, in particular, but might as well
|
# now we need to adjust end, in particular, but might as well
|
||||||
# do ns properly, too
|
# do ns properly, too
|
||||||
newlines = (ne - ns) - len(subst) + len(custom)
|
newlines = (ne - ns) - len(subst)
|
||||||
ns += newlines + 2
|
ns += newlines + 2
|
||||||
end += newlines + 2
|
end += newlines + 2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user