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 are broken in AsciiDoc version 3.1.0 #20

Closed
syee514 opened this issue Nov 14, 2017 · 6 comments
Closed

Links are broken in AsciiDoc version 3.1.0 #20

syee514 opened this issue Nov 14, 2017 · 6 comments
Labels

Comments

@syee514
Copy link

syee514 commented Nov 14, 2017

Hello,

With AsciiDoc version 3.1.0, after clicking on a link in an AsciiDoc document, the link does not go to the correct target but lists the files in the folder. AsciiDoc 3.1.0 determines the link to be /#?at=refs/heads/master which does not exist whereas AsciiDoc 3.0.0 determines the link to be /# which exists and the target is displayed.

Can you please resolve the issue so that the links are followed.

Thanks!

@ar613
Copy link

ar613 commented Nov 14, 2017

This looks like an issue with #19

     /**
      * Handle links and convert relative locations to absolute URLs
      */
     function handleLinks($content, asciiDocRawUrl, commitHash) {
         $('a', $content).each(function () {
             if(!this.getAttribute('href').startsWith('http'))
                 this.href = getBaseUrl(asciiDocRawUrl) + this.getAttribute('href') + '?at=' + commitHash;
         });
     }

@christiangalsterer
Copy link
Owner

I just gave it a try and it worked for me using the following syntax.

==== Include Using Relative Path

include::include/include.adoc[]

==== Include Using Variables

include::{includedir}/include.adoc[]

I noticed that there is an issue with table of contents.

Can you provide an example of the link syntax you use along with the Bitbucket version.

@syee514
Copy link
Author

syee514 commented Nov 14, 2017

The issue is with the table of contents where by the table of content links are not followed.
The Bitbucket version is 5.5.1.

@christiangalsterer
Copy link
Owner

thanks for the update. Will look into it to create proper links for TOC

@christiangalsterer
Copy link
Owner

A new version 3.1.1 is available on the Atlassian Marketplace

@christiangalsterer
Copy link
Owner

A new version 2.4.1 is available on the Atlassian Marketplace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants