Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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.

Literal Block

Literal blocks are converted as pre-formatted text.

....
this is a literal block
....
this is a literal block

Listing Block

Listing blocks are converted using the "noformat" macro.

.Title of the listing block
----
this is a listing block
----
Title of the listing block
this is a listing 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)

[source,java]
----
public class MyCode {
    // comment
}
----
public class MyCode {
    // comment
}

Source Blocks from External Files (Full Content)

Including source code from external files is supported:

[source,java]
----
include::../files/Source.java[]
----
public class Source {
    // code from included source file
}

Source Blocks from External Files (Partial Content)

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

[source,java]
----
include::../files/SourceWithMethodTag.java[tags=myMethod]
----
    public void myMethod() {
        // method from included source file
    }

Other advanced features like listing file names or callouts are not supported.

  • No labels