Skip to content

Commit

Permalink
bindgen(zig): Fix empty comment leading whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderArvidsson committed Jan 7, 2025
1 parent 6d3258f commit ee787e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bindgen/gen_zig.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ def l(s):
def c(s, indent=""):
if not s:
return
prefix = f"{indent}/// "
l(textwrap.indent(textwrap.dedent(s), prefix=prefix, predicate=lambda line: True))
prefix = f"{indent}///"
for line in textwrap.dedent(s).splitlines():
l(f"{prefix} {line}" if line else prefix )

def as_zig_prim_type(s):
return prim_types[s]
Expand Down

0 comments on commit ee787e2

Please sign in to comment.