Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jump to code #276

Open
jbriales opened this issue Aug 31, 2024 · 1 comment
Open

Jump to code #276

jbriales opened this issue Aug 31, 2024 · 1 comment

Comments

@jbriales
Copy link

I noticed this already works more or less?
Double-click on certain elements of the diagram updates the cursor position in the code.
It may be either of:

  • very accurate
  • off by some lines
  • totally off

Is this an (undocumented) feature of the plugin?
If so, what's the relevant code/logic in case I or someone can contribute improvements/fixes there?

@mjbvz
Copy link
Owner

mjbvz commented Oct 23, 2024

This doesn't come from this extension but is instead just VS Code's built-in markdown extensions normal behavior with rendered fenced code block elements

Some possible approaches:

  • Make the cursor always go to a consistent location (such as the start of the diagram markup)

  • Disabling this feature entirely for diagrams

  • Seeing if mermaid has a way to map from diagram click location back to source location

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants