Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

AsciiDoc literal blocks, listing blocks and code blocks are converted to formatted blocks in Confluence.

A title can be set for each type of block. The title is rendered as the title of the Confluence panel.

Anchor
_literal_block
_literal_block
Literal Block

Literal blocks are converted as pre-formatted text.

No Format
....
this is a literal block
....
this is a literal block

Anchor
_listing_block
_listing_block
Listing Block

Listing blocks are converted using the "noformat" macro.

...

No Format
titleTitle of the listing block
this is a listing block

Anchor
_source_block
_source_block
Source Block

Source blocks are converted using the "code" macro. Only languages supported by the Code Block Macro can be used: actionscript3, applescript, bash, c#, cpp, css, coldfusion, delphi, diff, erl, groovy, xml, java, jfx, js, php, perl, text, powershell, py, ruby, sql, sass, scala, vb, yml (since Confluence 6.7 only)

...

Code Block
languagejava
public class MyCode {
    // comment
}

Anchor
_source_blocks_from_external_files_full_content
_source_blocks_from_external_files_full_content
Source Blocks from External Files (Full Content)

Including source code from external files is supported:

...

Code Block
languagejava
public class Source {
    // code from included source file
}

Anchor
_source_blocks_from_external_files_partial_content
_source_blocks_from_external_files_partial_content
Source Blocks from External Files (Partial Content)

Restricting the source code to be included based on tags is supported:

...