diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e3f48ad..c994a984 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,7 +56,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - BoM: Digi-key link in the HTML output. - Problems when using more than one dielectric in the stack-up. (#328) - Gerber: Extension used for JLCPCB inner layers. (#329) -- BoM: The length of the CSV separator is now validated. +- BoM: + - The length of the CSV separator is now validated. + - Using \t, \n, \r and \\ is now supported. (See #334) ## [1.4.0] - 2022-10-12 ### Added diff --git a/kibot/out_bom.py b/kibot/out_bom.py index 7a8c78bf..13d38845 100644 --- a/kibot/out_bom.py +++ b/kibot/out_bom.py @@ -260,6 +260,11 @@ class BoMCSV(Optionable): def config(self, parent): super().config(parent) + if self.separator: + self.separator = self.separator.replace(r'\t', '\t') + self.separator = self.separator.replace(r'\n', '\n') + self.separator = self.separator.replace(r'\r', '\r') + self.separator = self.separator.replace(r'\\', '\\') if len(self.separator) != 1: raise KiPlotConfigurationError('The CSV separator must be one character (`{}`)'.format(self.separator))