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

Ill-formed markdown link with Extract to link definition #167

Closed
memeplex opened this issue Mar 6, 2024 · 1 comment · Fixed by #168
Closed

Ill-formed markdown link with Extract to link definition #167

memeplex opened this issue Mar 6, 2024 · 1 comment · Fixed by #168
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@memeplex
Copy link

memeplex commented Mar 6, 2024

  • VS Code Version: 1.87.0
  • OS Version: macOS Sonoma

Steps to Reproduce:

  1. Lorem <https://daringfireball.net/projects/markdown> dolor
    
  2. Extract to link definition
  3. Lorem <[ipsum]> dolor
    
    [ipsum]: ttps://daringfireball.net/projects/markdow
    

Two issues:

  • <[ipsim]> the angle brackets are wrong
  • ttps://daringfireball.net/projects/markdow first and last characters are missing

On a side note, I would like to ask for:

  • Either the ability to paste a link as a reference + link definition
  • Or that Extract to link definition works on bare urls without the angle brackets

The reason is that inline links make the text hard to read so I usually paste urls from the web as link definitions, but it's repetitive and error prone work (the reference has to be typed twice or copy&pasted, may end up broken). Even if the reported bug were fixed, I would have to add angle brackets to every url just to be able to take advantage of the refactor.

Given that you already support:

image

and that the highlighting of bare urls is like the one for links (although not the textmate scope) I would say that the best option is to treat bare urls as proper links for refactoring purposes.

@mjbvz mjbvz transferred this issue from microsoft/vscode Mar 11, 2024
@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Mar 11, 2024
mjbvz added a commit to mjbvz/vscode-markdown-languageservice that referenced this issue Mar 11, 2024
@memeplex
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants