Skip to content

Commit

Permalink
Improve parsing of sections names
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Aug 8, 2024
1 parent ed48c43 commit 90a5425
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/multicsv/file.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

from typing import TextIO, Optional, Type, List, MutableMapping, Iterator
import csv
import shutil
import os
import io
Expand Down Expand Up @@ -266,9 +267,8 @@ def end_section() -> None:
if line.endswith("\n"):
line = line[:-1]

row = line.split(",")

if row:
if line:
row = next(csv.reader([line]))
first = row[0].strip()
rest = row[1:]

Expand Down

0 comments on commit 90a5425

Please sign in to comment.