Invocation Order

This section explains the order of method invocations on a syntax highlighter. For a concrete example we use this document:

= Syntax Highlighter Test

== Some sources

[source,java]
----
System.out.println("Hello Java");
----

[source,go]
----
fmt.Println("Hello Go")
----

For this document the calls to a syntax highlighter will happen in this order:

  1. New SyntaxHighlighter

  2. format java

  3. highlight System.out.println("Hello Java");

  4. format go

  5. highlight fmt.Println("Hello Go")

  6. hasDocInfo for HEADER

  7. getDocInfo for HEADER

  8. hasDocInfo for FOOTER

  9. getDocInfo for FOOTER

  10. isWriteStylesheet

  11. writeStylesheet