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

Links don't work properly #99

Closed
rschuetzler opened this issue Jul 23, 2018 · 9 comments · Fixed by #836
Closed

Links don't work properly #99

rschuetzler opened this issue Jul 23, 2018 · 9 comments · Fixed by #836

Comments

@rschuetzler
Copy link

I might be doing something wrong, but here's an example of a link in one of my documents:

* https://jvns.ca/networking-zine.pdf[Networking, Ack! Zine]

In the Asciidoc output it works fine, but inside the document when editing, the link becomes (https://jvns.ca/networking-zine.pdf[Networking), so if I click the link to visit a site, I get an error because [Networking is not a part of the URL.

@FatihBozik
Copy link

Hi @rschuetzler ,

It's a long time since the issue was opened. I can't reproduce it.
Can you test if the issue continues in the last version?

@anthonyvdotbe
Copy link

I can reproduce it with v2.7.6 and the following environment:

Version: 1.39.2 (user setup)
Commit: 6ab598523be7a800d7f3eb4d92d7ab9a66069390
Date: 2019-10-15T15:35:18.241Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362

@FatihBozik
Copy link

Ok. It's my fault. I can reproduce the issue when I try again.

@sanzoghenzo
Copy link

duplicate of #116

It's actually a vscode issue: microsoft/vscode#67022

@ieugen
Copy link

ieugen commented Jan 3, 2021

The recommendation is to fix this with a link provider for asciidoc filetype microsoft/vscode#67022 (comment) .

https://code.visualstudio.com/api/references/vscode-api
https://code.visualstudio.com/api/references/vscode-api#DocumentLinkProvider
https://code.visualstudio.com/api/references/vscode-api#DocumentSelector

@danyill
Copy link
Contributor

danyill commented Oct 20, 2021

We should also register a LinkProvider for include and xref file references.

danyill added a commit to danyill/asciidoctor-vscode that referenced this issue Oct 30, 2021
danyill added a commit to danyill/asciidoctor-vscode that referenced this issue Oct 30, 2021
danyill added a commit to danyill/asciidoctor-vscode that referenced this issue Oct 30, 2021
danyill added a commit to danyill/asciidoctor-vscode that referenced this issue Nov 12, 2021
danyill added a commit to danyill/asciidoctor-vscode that referenced this issue Jan 30, 2022
ggrossetie pushed a commit to danyill/asciidoctor-vscode that referenced this issue Jan 30, 2022
ggrossetie pushed a commit to danyill/asciidoctor-vscode that referenced this issue Jan 30, 2022
@danyill danyill reopened this Jan 30, 2022
@Oobiewan
Copy link

Oobiewan commented Jan 8, 2024

There's still a problem with detecting the end of URLs in the editor, is there a chance for further improvements?
It would be good if further common scenarios could be handled such as when a URL is followed by punctuation (recognized as not being a part of the URL itself based on the following space).
image

@ggrossetie
Copy link
Member

Could you please copy/paste the text in your screenshot so we can add it in our test suite?

@Oobiewan
Copy link

Oobiewan commented Jan 9, 2024

Hi, here's the example:

You can refer to a URL such as https://github.com/asciidoctor/asciidoctor-vscode/, and continue the sentence or the paragraph. The end of the URL is never recognized therefore highlighting and Ctrl+click are broken. 

And I just came across another one where even the closing square bracket is not recognized as the end of the link:

Filters are created as RPN filters (Reverse Polish notation [https://wikipedia.org/wiki/Reverse_Polish_notation]) with the following syntax:

image

ggrossetie added a commit to ggrossetie/asciidoctor-vscode that referenced this issue Jan 12, 2024
ggrossetie added a commit to ggrossetie/asciidoctor-vscode that referenced this issue Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants