Links
Links can have 3 forms:
Inline link:
[github](http://www.github.com)
Example:
Wiki Style link:
[[http://www.github.com]]
Example:
Reference link:
[github home page][github]
And somewhere else in the page:
[github]: http://www.github.com
Example:
Links to Markdown pages or other resources
Markdown pages can be referenced with the page file if not ambiguous.
See [[doc.md]]
Example:
Reference can be relative to the page directory:
link to [file in img directory](img/uml.png)
Example:
link to file in img directory
Use absolute path for other files:
See [[/reference/doc.md]]
Example:
Links to javadoc entries
Generated javadoc pages can be referenced from markup pages.
Packages
Reference to a package is done using the qualified package name:
[[com.parrot.docdown.generator]]
Example:
Classes
Reference to a class is done using the simple class name if not ambiguous:
class [[DocdownOption]]
Example:
class DocdownOption
class [[com.parrot.docdown.DocdownOption]]
Reference to a class can also be done using the full qualified class name:
Example:
class DocdownOption
Class fields
Class fields are referenced using the class name reference, followed by # and the field name:
field [[DocdownOption#title]]
Example:
field DocdownOption.title
Enum values are referenced like fields.
Class methods
Class methods are referenced using the class name reference, followed by # and the method name if not ambiguous:
method [[DocdownOption#validOptions]]
Example:
method DocdownDoclet.validOptions(String[][], DocErrorReporter)
If ambiguous, the method parameters type can be specified, either unqualified no-highlight
method [[DocdownOption#validOptions(String[][], DocErrorReporter)]]]
Example:
method DocdownDoclet.validOptions(String[][], DocErrorReporter)]
or fully qualified
method [[DocdownOption#validOptions(java.lang.String[][], com.sun.javadoc.DocErrorReporter)]]]
Example:
method DocdownDoclet.validOptions(String[][], DocErrorReporter)]
Inner classes must always be qualified with the outer class name.
Note:
Due to limitation in the markdown parser, inline links to methods are not recognizes as links if they contains spaces or parenthesis. To create a inline link to a method while specifying its parameters, parenthesis must be escaped with \
and parameters must not be separated by spaces:
method [validOptions](DocdownDoclet#validOptions\(String[][],DocErrorReporter\))
Example:
method validOptions
Parenthesis escape are not require for reference links, but as in inline links parameters must not be separated by spaces:
method [validOptions][](DocdownDoclet#validOptions\(String[][],DocErrorReporter\))
[validOptions]: DocdownDoclet#validOptions(String[][],DocErrorReporter)
Example:
method validOptions