asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
322 stars 97 forks source link

Jump to remote document anchor does not work #705

Open ulrichsch opened 1 year ago

ulrichsch commented 1 year ago

document.adoc:

...
[[idname]]
A paragraph with an anchor
...

The referencing document:

link:document.adoc#idname[Link to remote document anchor]

Problem: The remote document is opened but its top is shown instead of the referenced paragraph.

Remark: I also tried using xref: instead of link: but with this a .html page in the browser is tried to be opened instead of the referenced AsciiDoc document.

ggrossetie commented 12 months ago

Remark: I also tried using xref: instead of link: but with this a .html page in the browser is tried to be opened instead of the referenced AsciiDoc document.

I believe that happens in the preview? I'm working on improving xref support, see #744.

You should definitely use xref and not link when referencing an AsciiDoc file.

illnr commented 5 months ago

Are there any plans on supporting xref anchor links in preview? I can't make it work atm.

ViToni commented 4 months ago

@illnr Seems related to #425.