Comments in code is considered as focus
Hi @pomber and thanks for this awesome work!
I'm facing an issue but not sure if it's a bug or if I'm not using it the right way. The following .mdx triggers this error:
error running remarkCodeHike FocusNumberError: Invalid number "" in focus string
```js
export const sorts = [
// {
// label: 'My label',
// value: 'my_value',
// }
];
It looks like the comments in the code are considered as a focus comment syntax by Code Hike 🤔 Is it a bug or something expected? Moreover, I'm using contentlayer on top of it but I'm not sure this is related.
Thanks!
Oh, that's because Code Hike has a label annotation, and it's interpreting // label: 'My label', as an annotation.
Two things we need to improve:
- a better error message
- a way to escape annotations
Thanks for the clarification!