Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
3 posts
|
This post was updated on May 28, 2018; 9:47am.
In some places I generate Asciidoc files out of miscellaneous data.
From the following generated Asciidoc link, Ascidoctor generates an HTML paragraph in stead of an HTML anchor. Asciidoc link: "link:/Support/Tutorials/Code_Integration_Tutorial/Using_Dezyne_in_your_C++_environment.html[Using Dezyne in your C++ environment]" HTML text: "link:/Support/Tutorials/Code_Integration_Tutorial/Using_Dezyne_in_your_C_environment.html[Using Dezyne in your C environment]" As you can see, Asciidoctor interpretes the plusses in the URL as well as in the link text. How do I need to format the Asciidoc link to get the correct HTML anchor tag? I can manipulate the URL differently from the link text. For your information; I use Asciidoctor 1.5.5 on Ubuntu 18.04. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
242 posts
|
Not sure this is the most appropriate solution, but this is the only that worked for me.
Using the passthrough instead of + notation like this: link:pass:[/Support/Tutorials/Code_Integration_Tutorial/Using_Dezyne_in_your_C++_environment.html][pass:[Using Dezyne in your C++ environment]] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
3 posts
|
Perfect!
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
In reply to this post by maartenvandewaarsenburg
++ is a reserved character sequence in AsciiDoc (and a very strong one). The solution is to an attribute reference. Since C++ is such a common term in tech, there's a built-in attribute for it named cpp. link:/Support/Tutorials/Code_ The reason this works is because attribute substitutions happen after ++ is interpreted. For other strategies, see https://asciidoctor.org/docs/user-manual/#complex-urls If you're writing about some other ++ language, such as SQL++, then what I recommend is defining ++ as the attribute pp. :pp: ++ Now I can write about SQL{pp}. (we might consider just making this a built-in attribute). -Dan On Mon, May 28, 2018 at 2:08 AM, maartenvandewaarsenburg [via Asciidoctor :: Discussion] <[hidden email]> wrote: In some places I generate Asciidoc files out of miscellaneous data. ... [show rest of quote] Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
3 posts
|
@mojavelinux (Dan):
That's a very valuable remark you make. And I will certainly use it in handwritten Asciidoc. But as, in this case, the Asciidoc is generated from data I have to deal with, I'll use abelsromero's suggestion. Do you agree or can I get into trouble? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2681 posts
|
For generated content, the pass macro is a very handy tool. You can't go wrong. -Dan On Mon, May 28, 2018 at 3:37 AM, maartenvandewaarsenburg [via Asciidoctor :: Discussion] <[hidden email]> wrote: @mojavelinux (Dan): Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Free forum by Nabble | Edit this page |