aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSimon Hengel <sol@typeful.net>2014-11-02 13:10:58 +0800
committerSimon Hengel <sol@typeful.net>2014-11-03 09:34:20 +0800
commitd1f0e6ed1e271eb165abdecf7a5eae4f5c573ade (patch)
tree8b3e6c5511c612727f3a62bf16d80051837e2cd5 /doc
parent58a5683d1ce759f80ca7eb3b35663b717ae2abd5 (diff)
Update documentation
Diffstat (limited to 'doc')
-rw-r--r--doc/haddock.xml44
1 files changed, 32 insertions, 12 deletions
diff --git a/doc/haddock.xml b/doc/haddock.xml
index 662aafd3..1fece5b3 100644
--- a/doc/haddock.xml
+++ b/doc/haddock.xml
@@ -2078,22 +2078,42 @@ This belongs to the list above!
<section>
<title>URLs</title>
- <para>A URL can be included in a documentation comment by
- surrounding it in angle brackets:
- <literal>&lt;...&gt;</literal>. If the output format supports
- it, the URL will be turned into a hyperlink when
- rendered.</para>
+ <para>
+ A URL can be included in a documentation comment by surrounding it in
+ angle brackets, for example:
+ </para>
- <para>The URL can be followed by an optional label:</para>
<programlisting>
-&lt;http://example.com label&gt;
+&lt;http://example.com&gt;
</programlisting>
- <para>The label is then used as a descriptive text for the hyperlink, if the
- output format supports it.</para>
- <para>If Haddock sees something that looks like a URL (such as something starting with
- <literal>http://</literal> or <literal>ssh://</literal>) where the URL markup is valid,
- it will automatically make it a hyperlink.</para>
+ <para>
+ If the output format supports it, the URL will be turned into a
+ hyperlink when rendered.
+ </para>
+
+ <para>If Haddock sees something that looks like a URL (such as something starting with
+ <literal>http://</literal> or <literal>ssh://</literal>) where the URL markup is valid,
+ it will automatically make it a hyperlink.</para>
+ </section>
+
+ <section>
+ <title>Links</title>
+
+ <para>
+ Haddock supports Markdown syntax for inline links. A link consists
+ of a link text and a URL. The link text is enclosed in square
+ brackets and followed by the URL enclosed in regular parentheses, for
+ example:
+ </para>
+
+<programlisting>
+[some link](http://example.com)
+</programlisting>
+ <para>
+ The link text is used as a descriptive text for the URL, if the
+ output format supports it.
+ </para>
</section>
<section>