mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Reduce whitespace differences to LyX
LyX writes an empty line between \end_layout and \begin_layout, so we should do so as well.
This commit is contained in:
parent
7b07788278
commit
1da21bec71
@ -328,39 +328,37 @@ def write_fields(file, lfun):
|
|||||||
file.write("\\begin_layout Subsection*\n")
|
file.write("\\begin_layout Subsection*\n")
|
||||||
file.write(lfun["name"] + "\n")
|
file.write(lfun["name"] + "\n")
|
||||||
file.write("\\end_layout\n")
|
file.write("\\end_layout\n")
|
||||||
#file.write("\n")
|
file.write("\n")
|
||||||
if lfun["action"] != "":
|
if lfun["action"] != "":
|
||||||
file.write("\\begin_layout Description\n")
|
file.write("\\begin_layout Description\n")
|
||||||
file.write("Action " + lfun["action"] + "\n")
|
file.write("Action " + lfun["action"] + "\n")
|
||||||
#file.write("\n")
|
|
||||||
file.write("\\end_layout\n")
|
file.write("\\end_layout\n")
|
||||||
#file.write("\n")
|
file.write("\n")
|
||||||
if lfun["notion"] != "":
|
if lfun["notion"] != "":
|
||||||
file.write("\\begin_layout Description\n")
|
file.write("\\begin_layout Description\n")
|
||||||
file.write("Notion " + lfun["notion"] + "\n")
|
file.write("Notion " + lfun["notion"] + "\n")
|
||||||
file.write("\\end_layout\n")
|
file.write("\\end_layout\n")
|
||||||
#file.write("\n")
|
file.write("\n")
|
||||||
if lfun["syntax"] != "":
|
if lfun["syntax"] != "":
|
||||||
file.write("\\begin_layout Description\n")
|
file.write("\\begin_layout Description\n")
|
||||||
file.write("Syntax " + lfun["syntax"] + "\n")
|
file.write("Syntax " + lfun["syntax"] + "\n")
|
||||||
file.write("\\end_layout\n")
|
file.write("\\end_layout\n")
|
||||||
#file.write("\n")
|
file.write("\n")
|
||||||
if lfun["params"] != "":
|
if lfun["params"] != "":
|
||||||
file.write("\\begin_layout Description\n")
|
file.write("\\begin_layout Description\n")
|
||||||
file.write("Params " + lfun["params"] + "\n")
|
file.write("Params " + lfun["params"] + "\n")
|
||||||
file.write("\\end_layout\n")
|
file.write("\\end_layout\n")
|
||||||
#file.write("\n")
|
file.write("\n")
|
||||||
if lfun["sample"] != "":
|
if lfun["sample"] != "":
|
||||||
file.write("\\begin_layout Description\n")
|
file.write("\\begin_layout Description\n")
|
||||||
file.write("Sample " + lfun["sample"] + "\n")
|
file.write("Sample " + lfun["sample"] + "\n")
|
||||||
file.write("\\end_layout\n")
|
file.write("\\end_layout\n")
|
||||||
#file.write("\n")
|
file.write("\n")
|
||||||
if lfun["origin"] != "":
|
if lfun["origin"] != "":
|
||||||
file.write("\\begin_layout Description\n")
|
file.write("\\begin_layout Description\n")
|
||||||
file.write("Origin " + lfun["origin"] + "\n")
|
file.write("Origin " + lfun["origin"] + "\n")
|
||||||
file.write("\\end_layout\n")
|
file.write("\\end_layout\n")
|
||||||
#file.write("\n")
|
file.write("\n")
|
||||||
file.write("\n")
|
|
||||||
|
|
||||||
def write_sections(file,lfuns):
|
def write_sections(file,lfuns):
|
||||||
"""Write sections of LFUNs"""
|
"""Write sections of LFUNs"""
|
||||||
@ -378,6 +376,7 @@ def write_sections(file,lfuns):
|
|||||||
file.write("\\begin_layout Section\n")
|
file.write("\\begin_layout Section\n")
|
||||||
file.write(section_headings[val] + "\n")
|
file.write(section_headings[val] + "\n")
|
||||||
file.write("\\end_layout\n")
|
file.write("\\end_layout\n")
|
||||||
|
file.write("\n")
|
||||||
for lf in lfuns:
|
for lf in lfuns:
|
||||||
if lf["type"] == val:
|
if lf["type"] == val:
|
||||||
write_fields(file, lf)
|
write_fields(file, lf)
|
||||||
|
Loading…
Reference in New Issue
Block a user