[BoM] Using \t, \n, \r and \\ is now supported.

See #334
This commit is contained in:
Salvador E. Tropea 2022-11-24 09:58:16 -03:00
parent 38d0790a69
commit d72913a280
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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))