Skip to content

MarkdownOption

Michalis Kamburelis edited this page Sep 7, 2019 · 1 revision

Overview

Run PasDoc with --markdown command-line option to understand (a subset of) Markdown syntax in the comments. This allows to specify various formatting options without writing @tags, which sometimes looks much more readable.

Supported blocks

Note that only a subset of Markdown syntax is supported.

  • Bold text: **bold** or __bold__ (output like @bold tag)

  • Italic text: *italic* or _italic_ (output like @italic tag)

  • Inline code: `code` (output like @code tag)

  • Multi-line code (preformatted text, output like @preformatted tag):

    Important note: Use 3 backtick characters, like this ```, to make this work. In the example below we show 3 apostrophes because of a limitation of GitHub wiki formatting (seems to implement incomplete/old AsciiDoctor syntax for escaping).

    '''
    Example
    preformatted
    multi-line
    text.
    '''
  • Multi-line Pascal code with syntax highlighting (output like @longCode tag):

    Important note: Use 3 backtick characters, like this ```, to make this work. In the example below we show 3 apostrophes because of a limitation of GitHub wiki formatting (seems to implement incomplete/old AsciiDoctor syntax for escaping).

    '''pascal
    if Foo then
      Writeln('Example Pascal code'); // comment
    '''
  • Unordered lists (output like @unorderedlist tag):

    * item 1
    * item 2
  • Ordered lists (output like @orderedlist tag):

    1. item 1
    2. item 2

Notes on lists

Lists are defined with the usual format:

[WHITESPACE*N]MARKER[item contents]
NEWLINE

Where:

  • WHITESPACE*N is any number (including zero) of tabs #9 or spaces #32

  • MARKER is

    • * or -, followed by one whitespace character, for unordered lists

    • NUMBER, followed by . or ), followed by one whitespace character, for ordered lists

  • NEWLINE is an empty line

Nested lists are supported as well. Each nested list must be indented with at least one more whitespace character than the parent item:

* item 1
  * item 1.2
    * item 1.3

Example unit

PasDoc, documentation generator for Pascal:
Features:
Supported Tags:
Command Line:
Development:
Developers pages:
Clone this wiki locally
You can’t perform that action at this time.