...
Info |
---|
Collapsed source blocks are currently not supported by AsciiDoc directly, thus this is a non-standard feature only supported by the Confluence Publisher. |
CalloutsCallout are supported well. Due to code blocks limitation in Confluence it is advised to use guarded callouts, i.e. to place the callout into a comment.
No Format |
---|
[source,java,linenums]
----
public class MyClass { // <1>
public static void main(String[] args){
System.out.println("Hello world!");// <2>
}
} <3>
----
<1> Definition of a Java class
<2> print "Hello world!" to the standard out
<3> Non-guarded callout. Code will be invalid if you copy it and paste in IDE |
will be rendered as:
Code Block |
---|
language | java |
---|
linenumbers | true |
---|
|
public class MyClass { // (1)
public static void main(String[] args){
System.out.println("Hello world!");// (2)
}
} (3) |
Definition of a Java class
print "Hello world!" to the standard out
Non-guarded callout. Code will be invalid if you copy it and paste in IDE
No Format |
---|
[source,xml]
----
<hello>world</hello><!--1-->
----
<1> Xml-style callout. |
will be rendered as:
Code Block |
---|
|
<hello>world</hello><!--(1)--> |
Anchor |
---|
| _source_highlighting |
---|
| _source_highlighting |
---|
|
Source Highlighting
...
Note |
---|
Other advanced features like listing file names or callouts are not supported. |