3.1.2. Formatting¶
Vala’s documentation comment formatting syntax is inspired by wiki markup (wikitext).
Note
This website’s own styling may affect some of the outputs.
In reality the outputs may look slightly different. This page gives you an idea of the expected output.
3.1.2.1. Linebreaks and Paragraphs¶
3.1.2.1.1. Comment¶
/**
* First paragraph,
* still the first paragraph
*
* Second paragraph, first line,<<BR>>
* second paragraph, second line
*/
3.1.2.1.2. Output¶
First paragraph, still the first paragraph
Second paragraph, first line, second paragraph, second line
3.1.2.2. Text Highlighting¶
3.1.2.2.1. Comment¶
/**
* ''bold'' //italic// __underlined__ ``block quote``,
* ''//__bold italic underlined__//''
*/
3.1.2.2.2. Output¶
bold italic underlined
block
quote
,
bold italic underlined
3.1.2.3. Lists¶
Two spaces are required after new lines
3.1.2.3.1. Comment¶
/**
* Short description
*
* 1. numbered list
* 1. numbered list
* 1. numbered list
*
* # numbered list
* # numbered list
* # numbered list
*
* i. numbered list
* i. numbered list
* i. numbered list
*
* I. numbered list
* I. numbered list
* I. numbered list
*
* a. alphabetical list
* a. alphabetical list
* a. alphabetical list
*
* A. alphabetical list
* A. alphabetical list
* A. alphabetical list
*
* * dotted list
* * dotted list
* * dotted list
*
* A. alphabetical list
* a. alphabetical list
* a. alphabetical list
* A. alphabetical list
* a. alphabetical list
* a. alphabetical list
* A. alphabetical list
*/
3.1.2.3.2. Output¶
Short description
numbered list
numbered list
numbered list
numbered list
numbered list
numbered list
numbered list
numbered list
numbered list
numbered list
numbered list
numbered list
numbered list
numbered list
numbered list
alphabetical list
alphabetical list
alphabetical list
dotted list
dotted list
dotted list
alphabetical list
alphabetical list
alphabetical list
alphabetical list
alphabetical list
alphabetical list
alphabetical list
3.1.2.4. Code Blocks¶
3.1.2.4.1. Comment¶
/**
* Short description
*
* {{{
* static int main (string[] arg) {
* return 0;
* }
* }}}
*
*/
3.1.2.4.2. Output¶
Short description
static int main (string[] arg) {
return 0;
}
3.1.2.5. Images and Links¶
3.1.2.5.1. Comment¶
Note
Only local images can be used
/**
* [[https://vala.dev|Vala]] [[https://vala.dev]]
*
* {{/assets/logo.png}} {{/assets/logo.png|alt-message}}
*/
3.1.2.5.2. Output¶
3.1.2.6. Tables¶
3.1.2.6.1. Comment¶
/**
* Short description
*
* || ''headline'' || ''headline'' ||
* || one cell || one cell ||
* || one cell || one cell ||
*
*/
3.1.2.6.2. Output¶
Short description
headline |
headline |
---|---|
one cell |
one cell |
one cell |
one cell |
3.1.2.7. Headers¶
3.1.2.7.1. Comment¶
/**
* Short description
*
* = header 1 =
* == header 2 ==
* === header 3 ===
* ==== header 4 ====
*/