code-hike / codehike

Build rich content websites with Markdown and React
https://codehike.org
MIT License
4.68k stars 142 forks source link

Type error when parsing the comments #104

Closed shuding closed 2 years ago

shuding commented 2 years ago

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

https://github.com/code-hike/codehike/blob/60e0c2099ac35cee96415c49fd893db1ccd0b3e3/packages/mdx/src/plugin/annotations.ts#L62-L65

github-actions[bot] commented 2 years ago

:rocket: Issue was released in v0.3.0 :rocket: