luminaxster / syntax-highlighter

An extensible library to highlight (and comment) JSX syntax in the Monaco Editor using Babel. It exposes its AST, so you can add your own syntax-based or custom highlights.
https://luminaxster.github.io/syntax-highlighter/
MIT License
30 stars 4 forks source link

addJSXCommentCommand doesn't seem to work #29

Open habahabahaba opened 1 month ago

habahabahaba commented 1 month ago

With monaco-editor (0.48.0),
@monaco-editor/react (4.6.0), @babel/parser (7.24.6), @babel/traverse (7.24.6),

addJSXCommentCommand doesn't seem to work: pressing " cmd / ctl " + "/ " on the line with the jsx-component or element, still results in "// " being added at the start of the line.

habahabahaba commented 1 month ago

I just played with your example on codesandbox.io and, after updating @babel/parser to 7.24.6 jsx, commenting stops working.

habahabahaba commented 1 month ago

Same with: "@babel/parser": "7.24.7", "@babel/traverse": "7.24.7", "@monaco-editor/react": "4.6.0",