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

Special characters throw error in Items.ts #47

Open
ransome1 opened this issue Sep 14, 2023 · 0 comments
Open

Special characters throw error in Items.ts #47

ransome1 opened this issue Sep 14, 2023 · 0 comments

Comments

@ransome1
Copy link

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.

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