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

Type error when parsing the comments #104

Closed
shuding opened this issue Jan 7, 2022 · 1 comment · Fixed by #105
Closed

Type error when parsing the comments #104

shuding opened this issue Jan 7, 2022 · 1 comment · Fixed by #105

Comments

@shuding
Copy link

shuding commented Jan 7, 2022

Here the regexp returns null for specific code comments, which results in an Uncaught TypeError: null is not iterable error:

// hello → works

//hello  → errors if there's no space after //
// 你好   → errors
// å     → errors

const commentRegex = /\/\/\s+(\w+)(\S*)\s*(.*)/
const [, key, focusString, data] = commentRegex.exec(
comment
)

@github-actions
Copy link

github-actions bot commented Mar 3, 2022

🚀 Issue was released in v0.3.0 🚀

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

Successfully merging a pull request may close this issue.

1 participant