Class SourceFormatter


  • public class SourceFormatter
    extends Object
    Source code formatting utility
    • Constructor Detail

      • SourceFormatter

        public SourceFormatter()
    • Method Detail

      • formatSource

        public static Pair<String,​Integer> formatSource​(String name,
                                                              String text,
                                                              String parentNodeId,
                                                              boolean tryColorer,
                                                              int startLine)
        Tries to highlight and then formats source code as HTML numbered list
        Parameters:
        name - source file name to help deduce language
        text - source text
        parentNodeId - list node id
        tryColorer - try to highlight
        startLine - list start line number
        Returns:
        formatted HTML