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

  1. numbered list

  2. numbered list

  3. numbered list

  1. numbered list

  2. numbered list

  3. numbered list

  1. numbered list

  2. numbered list

  3. numbered list

  1. numbered list

  2. numbered list

  3. numbered list

  1. numbered list

  2. numbered list

  3. numbered list

  1. alphabetical list

  2. alphabetical list

  3. alphabetical list

  • dotted list

  • dotted list

  • dotted list

  1. alphabetical list

    1. alphabetical list

    2. alphabetical list

  2. alphabetical list

    1. alphabetical list

    2. alphabetical list

  3. 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.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 ====
 */

3.1.2.7.2. Output

header 1

header 2

header 3

header 4