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

Block Anchors to Non Notes #3372

Open
1 of 7 tasks
ebromberg opened this issue Aug 10, 2022 · 2 comments
Open
1 of 7 tasks

Block Anchors to Non Notes #3372

ebromberg opened this issue Aug 10, 2022 · 2 comments
Labels
type.bug Something isn't working

Comments

@ebromberg
Copy link

ebromberg commented Aug 10, 2022

Please select the area your bug applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

  • Workspace. VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
  • Lookup. Dendron's Lookup Command
  • Views. Dendron Preview, Tree View, Side Panels in the UI
  • Schema. Dendron Schemas
  • Pod. Data import from / export to Dendron
  • Publish. External Site Publish
  • Markdown. Markdown features, such as syntax support and features

Describe the bug

This might not be supported but couldn't find any documentation stating either way. If I create a back link in a note to another file (not a note), it always take me to the top of the file and not to the line with the anchor.
If I create a block anchor in a note that references another note, hitting F12 will take me to the specific line.

To Reproduce

Steps to reproduce the behavior:

  1. Create a simple shell script.
    2 In the middle, create a comment line #this is my comment
  2. Hit Ctrl-Shift-C to copy the note link
  3. Open a note and paste.
  4. Click on the link and hit F12.
  5. The focus is taken to the shell script but the cursor is at line 1.

Expected behavior

I would expect to be taken to the line where the anchor is defined.

Screenshots

Test script:
image
Test Note:
image

Desktop (please complete the following information)

  • OS: Windows 10 Pro
  • Browser (if with published websites; include version): [e.g. chrome, safari]
  • Versions (all that apply to bug):
    • Dendron Extension: 0.107.2
    • VS Code version: 1.70
    • Dendron CLI:

Additional context

Add any other context about the problem here.

Dendron Log file

Please attach the output of > Dendron:Dev: Open Logs here
Dendronlog.txt

@github-actions github-actions bot added status.triage-needed type.bug Something isn't working labels Aug 10, 2022
@hikchoi
Copy link
Contributor

hikchoi commented Aug 11, 2022

Hey, thank you for the report.

Currently for non-note files, the VSCode native Go To Definition does not attempt to find the anchor position.
However, if you use Go To Note with your cursor above the link, it will correctly find the anchor position and move your cursor to the right location.

We'll take a look and see if we can make this work for F12.

@hikchoi
Copy link
Contributor

hikchoi commented Aug 11, 2022

and of course, clarify the documents so that this is clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type.bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants