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

Bug: CSV Comments header get overwritten and break file #227

Open
silverOrdeal opened this issue Aug 15, 2023 · 0 comments
Open

Bug: CSV Comments header get overwritten and break file #227

silverOrdeal opened this issue Aug 15, 2023 · 0 comments

Comments

@silverOrdeal
Copy link

silverOrdeal commented Aug 15, 2023

The current comment handling logic for csv seems to no expect a comment header. Starting to edit a csv will start to result in the csv header getting overwritten, if the user starts to input in a non-linear way (for example diagonally)

This is particularly annoying for folks requiring a comment header to their csv file.

See : https://www.w3schools.io/file/csv-comments/#:~:text=CSV%20contains%20comma%2Dseparated%20values,and%20read%20the%20CSV%20comments. for an example of a comment "Header", and below for

Screenshot :
image

Sample :

# ============================================================
# Comment example
# In this area we can describe different aspect of the CSV file
# Without impacting csv data.
# ============================================================

column, column, column, column

Steps to reproduce

  1. Create a csv file with the above content
  2. Open Raw file to the side
  3. Start to input some values in the editor across different columns and row. IMPORTANT : try to be random, and input non-sequentially (for example, input a column in sequence, then go to a previous row on another cell. This triggers the behaviour more consistently.
  4. See how the csv is updated from the top of the file, conflicting with comments and not saving properly.

Fix : Ensure that lines starting with the comment symbol are skipped when updating the csv file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant