From 8f7b2893dc9b6bc1b0c7d6f6476e98c8c27a948c Mon Sep 17 00:00:00 2001 From: jaseg Date: Tue, 4 Jul 2023 16:20:11 +0200 Subject: Fix failing symbol tests --- gerbonara/aperture_macros/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gerbonara/aperture_macros/parse.py') diff --git a/gerbonara/aperture_macros/parse.py b/gerbonara/aperture_macros/parse.py index d3658a5..45f8c41 100644 --- a/gerbonara/aperture_macros/parse.py +++ b/gerbonara/aperture_macros/parse.py @@ -113,7 +113,7 @@ class ApertureMacro: def to_gerber(self, unit=None): """ Serialize this macro's content (without the name) into Gerber using the given file unit """ - comments = [ str(c) for c in self.comments ] + comments = [ f'0 {c.replace("*", "_").replace("%", "_")}' for c in self.comments ] variable_defs = [ f'${var}={str(expr)[1:-1]}' for var, expr in enumerate(self.variables, start=1) if expr is not None ] primitive_defs = [ prim.to_gerber(unit) for prim in self.primitives ] return '*\n'.join(comments + variable_defs + primitive_defs) -- cgit