On Sat, Sep 6, 2014 at 1:52 AM, Ondra Žižka <[email protected]> wrote:

> Links currently look like:
>
>    link:<URL>[Label]
>
> That is not much readable, esp. if the URL gets long.
>

Although I agree the AsciiDoc syntax is different from many other
lightweight markup languages, it's perfectly consistent with other macros
in AsciiDoc itself. In general, the macro syntax in AsciiDoc follows the
pattern:

inline::
  name:target[attributes]

block::
  name::target[attributes]

Hence, for links, it's:

  link:url[label]

If the URL gets long, I recommend using an attribute to declare it, then
using the attribute reference in the target location:

link:{long-url}[Label]

If you look at some of the feedback that followed the announcement of
Common Markdown, many of them complain about how hard the link syntax is to
remember. This is one of the forms of Markdown I'd rather not let creep
into AsciiDoc. What helps people remember syntax is consistent, logical
patterns. The link syntax in AsciiDoc satisfies that requirement. I also
like it because it follows the same ordering of elements as in the HTML
output:

 link:target[Label] => <a href="target">Label</a>

In all of the forms you suggested, it's the reverse. I think that makes
them much harder to remember.

-Dan

-- 
Dan Allen | http://google.com/profiles/dan.j.allen

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to