Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example texts with "\n" break generated CSVs #106

Open
Blesmol opened this issue Oct 3, 2020 · 2 comments
Open

Example texts with "\n" break generated CSVs #106

Blesmol opened this issue Oct 3, 2020 · 2 comments
Labels
bug Something isn't working target: template creator Issue is relevant for people creating chronicle templates

Comments

@Blesmol
Copy link
Owner

Blesmol commented Oct 3, 2020

If an example text contains an escaped newline (\n), then the generated CSV file will contain a real newline, thus breaking the CSV format.

@Blesmol Blesmol added bug Something isn't working target: template creator Issue is relevant for people creating chronicle templates labels Oct 3, 2020
@Blesmol
Copy link
Owner Author

Blesmol commented Oct 3, 2020

According to documentation this should work.... https://golang.org/pkg/encoding/csv/

Although would be probably best here if this is also written out to CSV as \n again

@Blesmol
Copy link
Owner Author

Blesmol commented Oct 3, 2020

...because if the example text is printed as part of the legend, then the line is a comment. But the newline char is just printed into the file, creating a new non-comment line that then has the wrong format. D'oh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working target: template creator Issue is relevant for people creating chronicle templates
Projects
None yet
Development

No branches or pull requests

1 participant