code-hike / codehike

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

[mdx] Support more comment syntaxes #109

Closed pomber closed 1 year ago

pomber commented 2 years ago

We only support // syntax for comment annotations. Maybe we could use vscode-textmate directly to find any comment content for any supported lang.

Mayank-Sh07 commented 1 year ago

@pomber Why not have a globally supported comment annotation?

For example

// focus
inputOne = int(input())
inputTwo = int(input())

does not work with python, instead I'm required to detect and change the comment character to #. Supporting // or maybe some custom character across all languages would make it easier to separate out the codehike notations from the actual code when not relying completely on the metastring syntax.

github-actions[bot] commented 1 year ago

Released in v0.10.0-next.0 :rocket:

Thanks for using Code Hike! Become a sponsor and help us keep innovating.