gen_defines: don't emit comments with "# " lines
If the line is empty, just emit a single "#\n" instead of "# \n". Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
c63069489c
commit
d406439570
1 changed files with 2 additions and 1 deletions
|
@ -805,7 +805,8 @@ def out_comment(s, blank_before=True):
|
|||
# /* foo bar */
|
||||
print("/* " + s + " */", file=header_file)
|
||||
|
||||
print("\n".join("# " + line for line in s.splitlines()), file=conf_file)
|
||||
print("\n".join("# " + line if line.strip() else "#"
|
||||
for line in s.splitlines()), file=conf_file)
|
||||
|
||||
|
||||
def escape(s):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue