Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
163 posts
|
I am doing some testing with a small asciidoctorj macro: asciidoctorj-gh-edit
(API Change based on the feedback I got from Dan in the other thread on the mailing is work in progress). For the example, I am using Version 2.0.1 of the plugin inside a Maven build. Now consider this example: === Example 1 The article is open-source: gh:view[repository="asciidoctor/asciidoctor.org", path="news/debuter-avec-asciidoctor.adoc", server="https://www.github.com/"]. === Example 2 The article is open-source: gh:view[repository='asciidoctor/asciidoctor.org', path='news/debuter-avec-asciidoctor.adoc', server='https://www.github.com/']. The first example is correctly rendered. The second one (single quote instead of double quote) is not. The output I got: <h3 id="example-1"><a class="anchor" href="#example-1"></a>Example 1</h3> <div class="paragraph"> <p>The article is open-source: <a href="https://www.github.com/asciidoctor/asciidoctor.org/blob/master/news/debuter-avec-asciidoctor.adoc">view on GitHub</a>.</p> </div> </div> <div class="sect2"> <h3 id="example-2"><a class="anchor" href="#example-2"></a>Example 2</h3> <div class="paragraph"> <p>The article is open-source: <a href="<a href=" https:="" www.github.com="" "="" class="bare"></a><a href="https://www.github.com/" class="bare">https://www.github.com/</a>/asciidoctor/asciidoctor.org/blob/master/news/debuter-avec-asciidoctor.adoc">view on GitHub.</p> Putting an URL as single-quoted parameter does not seems to be supported by Asciidoctor. Is this a known issue? |
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
|
Jérémie, I believe the problem you are encountering is that double quotes and single quotes around attributes are not the same in AsciiDoc. Single quotes around an attribute (in most places) enables interpolation (aka substitutions). What's happening is that the URL is being converted to a link before it gets to your macro. Generally, it is bad practice to use single quotes around attributes unless your intention is to enable substitutions. I'm pretty sure in this case that is not the intention, so you'd want to stick to double quotes. Cheers, -Dan On Tue, Jun 14, 2016 at 8:56 AM, Jeremie Bresson [via Asciidoctor :: Discussion] <[hidden email]> wrote: I am doing some testing with a small asciidoctorj macro: asciidoctorj-gh-edit ... [show rest of quote] Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Free forum by Nabble | Edit this page |