Skip to content

Special characters throw error in Items.ts #47

@ransome1

Description

@ransome1

Hi.

Over at the sleek project, I switched to the next branch and by coincidence stumbled upon something you might be interested in.

If you try to parse some special characters like a Carriage return (\r) or Line Feed (\n) or even both (\r\n), this will throw an error in Item.ts at line 128.

TypeError: Cannot read properties of null (reading '2')
    at Item.parse (/Users/ransome/Development/sleek/node_modules/jstodotxt/src/Item.ts:128:25)
    at new Item (/Users/ransome/Development/sleek/node_modules/jstodotxt/src/Item.ts:106:8)

The old implementation is able to work with it. Hope it helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions