link macro can not be used

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

link macro can not be used

zera
Hi,

S1: I define :linkattrs:

S2: define the file link as below, and click the link. it can not link to the right file


so how to define the right link?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: link macro can not be used

mojavelinux
Administrator
You have defined the link correctly. However, it seems that whatever application is showing the preview is trying to open a web browser to view it and failing to do so.

If you inspect the HTML of the preview, you should see:

<div class="paragraph">
<p><a href="index.html">test file</a></p>
</div>

How that gets interpreted is outside the control of Asciidoctor.

-Dan

p.s. linkattrs is a boolean attribute; it does not accept a value, so the value of "entity" is meaningless


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: link macro can not be used

zera
Hi

If I define a link with a absolute path, it work normal, and can open in browse. but if I define a link with a relative path, it will give me as above.
In my work, I will share the doc to others, so a absolute path is not a good job, so how to solve it?

Thank you for replying to me.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: link macro can not be used

mojavelinux
Administrator
I really don't know. This is just how the URI handler works on your machine (and perhaps others too). Perhaps you can search and see if other people have solved that problem. If I knew what to tell you, I would.

-Dan

On Thu, Aug 3, 2017 at 7:36 PM, zera [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi

If I define a link with a absolute path, it work normal, and can open in browse. but if I define a link with a relative path, it will give me as above.
In my work, I will share the doc to others, so a absolute path is not a good job, so how to solve it?

Thank you for replying to me.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/link-macro-can-not-be-used-tp5789p5794.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Loading...