```python
def in_quote(ch: str) -> bool:
    """Return True if the character is a quotation mark."""
    return ch in ('"', "'")


def quote_split(line: str) -> list:
    """Split a line on commas, respecting quoted sections."""
    if not line:
        return []

    pieces: list[str] = []
    current_piece: list[str] = []
    in_quotes: bool = False
    quote_char: str | None = None

    for char in line:
        if char == ',':
            if in_quotes:
                current_piece.append(char)
            else:
                pieces.append(''.join(current_piece))
                current_piece = []
        elif in_quote(char):
            if not in_quotes:
                in_quotes = True
                quote_char = char
                current_piece.append(char)
            elif char == quote_char:
                in_quotes = False
                quote_char = None
                current_piece.append(char)
            else:
                current_piece.append(char)
        else:
            current_piece.append(char)

    pieces.append(''.join(current_piece))
    return pieces
```