Skip to content

Asciidoc xref links: WikiLinkOpen doesn't open links without hash #135

@mgoral

Description

@mgoral

Hi!

According to the help file, wiki.vim now supports these two forms of Asciidoc's inline macros:

xref:anchor[]
xref:file.adoc#anchor[]

However, I wonder if it should also support the first form (without the hash), but leading to another file instead of the anchor in current file:

xref:file.adoc[]

It looks like it is correct Asciidoc's document-to-document cross reference: https://docs.asciidoctor.org/asciidoc/latest/macros/inter-document-xref/#navigating-between-source-files

Currently, if user creates such xref by hand (because WikiLinkOpen automatically creates a version with hash), wiki.vim will do nothing and will print "Can't open link before you've saved the current buffer", which is also a different behaviour than if we had the version with hash (which would allow following the link without saving current buffer).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions