question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comment shortcut not using correct comment syntax

See original GitHub issue

Initial checklist

Affected packages and versions

mdxv2

Link to runnable example

No response

Steps to reproduce

Inside VSCode open a .mdx file and hightlight a line e.g.

# Some cool heading

Press <kbd>CMD</kbd> + <kbd>/</kbd> on macOS or <kbd>Ctrl</kbd> + <kbd>/</kbd>. Observe the line changes to:

<!-- # Some cool heading -->

Expected behavior

MDX requires using JS comment syntax not HTML e.g.

{/* # Some cool heading */}

Actual behavior

Wrong syntax is used.

Runtime

Node v16

Package manager

npm v6

OS

macOS

Build and bundle tools

webpack, Next.js

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
JounQincommented, Aug 25, 2022

@grahampcharles Thanks.

I just forgot mdx@v2 doesn’t use HTML style comments anymore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Comment Shortcut Not Working - Visual Studio Feedback
When attempting to comment out a line of code, using CTRL + '/' , about 20 clicks of the Slash are required to...
Read more >
VS 2019 - Toggle line comment shortcut not working?
For the default keyboard mapping scheme, Ctrl + / is assigned to EditorContextMenus.CodeWindow.GenerateDocumentationComments .
Read more >
Comment with Line Comment does not work
It works for a line and a text block. Uncomment with Ctrl + numeric pad /. Ctlr + Shift + numeric pad /...
Read more >
How to Comment in VS Code - The VSCode Comment Shortcut
Changing the comment key binds in VS Code · 1. Open the command input. Windows: Ctrl + Shift + P Mac: Command +...
Read more >
Visual Studio Comment Shortcuts: Efficiency Tips
The most basic shortcut for creating a comment is Ctrl+K, Ctrl+C. This, of course, is the default shortcut for Edit.CommentSelection, which can ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found