Class SyntaxHighlighter.HighlightResult

java.lang.Object
co.mindus.utils.SyntaxHighlighter.HighlightResult
Enclosing class:
SyntaxHighlighter

public static class SyntaxHighlighter.HighlightResult extends Object
Result of automatic language detection and highlighting.

Contains the highlighted HTML, the detected language name, and a relevance score indicating the confidence of the detection.

Author:
Christopher Mindus
  • Field Details

    • html

      public final String html
      The highlighted HTML with <span class="hljs-xxx"> token markup.
    • language

      public final String language
      The detected language name, or null if detection failed.
    • relevance

      public final int relevance
      The relevance score (higher = more confident detection).
  • Method Details

    • toString

      public String toString()
      Returns a diagnostic string with language, relevance, and HTML length.
      Overrides:
      toString in class Object