mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Simplify revert_suppress_date.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36051 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1bc5f3cb2b
commit
bbacb7c5be
@ -1170,11 +1170,9 @@ def revert_author_id(document):
|
||||
|
||||
def revert_suppress_date(document):
|
||||
" Revert suppressing of default document date to preamble code "
|
||||
i = 0
|
||||
while True:
|
||||
i = find_token(document.header, "\\suppress_date", i)
|
||||
i = find_token(document.header, "\\suppress_date", 0)
|
||||
if i == -1:
|
||||
break
|
||||
return
|
||||
# remove the preamble line and write to the preamble
|
||||
# when suppress_date was true
|
||||
date = get_value(document.header, "\\suppress_date", i)
|
||||
@ -1182,7 +1180,6 @@ def revert_suppress_date(document):
|
||||
add_to_preamble(document, ["% this command was inserted by lyx2lyx"])
|
||||
add_to_preamble(document, ["\\date{}"])
|
||||
del document.header[i]
|
||||
i = i + 1
|
||||
|
||||
|
||||
def revert_mhchem(document):
|
||||
|
Loading…
Reference in New Issue
Block a user