summaryrefslogtreecommitdiff
path: root/gerbonara/aperture_macros
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-07-04 16:20:11 +0200
committerjaseg <git@jaseg.de>2023-07-04 16:20:11 +0200
commit8f7b2893dc9b6bc1b0c7d6f6476e98c8c27a948c (patch)
treec9927e1f36c363a63e6479218b5dc5d7cd2d3156 /gerbonara/aperture_macros
parente696c09eac8f997fc82bbe281e9b6c76dc02308a (diff)
downloadgerbonara-8f7b2893dc9b6bc1b0c7d6f6476e98c8c27a948c.tar.gz
gerbonara-8f7b2893dc9b6bc1b0c7d6f6476e98c8c27a948c.tar.bz2
gerbonara-8f7b2893dc9b6bc1b0c7d6f6476e98c8c27a948c.zip
Fix failing symbol tests
Diffstat (limited to 'gerbonara/aperture_macros')
-rw-r--r--gerbonara/aperture_macros/parse.py2
1 files changed, 1 insertions, 1 deletions
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)