class Asciidoctor::SyntaxHighlighter::RougeAdapter

def highlight node, source, lang, opts

def highlight node, source, lang, opts
  @style ||= (style = opts[:style]) && (style_available? style) || DEFAULT_STYLE
  @requires_stylesheet = true if opts[:css_mode] == :class
  lexer = create_lexer node, source, lang, opts
  formatter = create_formatter node, source, lang, opts
  highlighted = formatter.format lexer.lex source
  if opts[:number_lines] && opts[:callouts]
    [highlighted, (idx = highlighted.index CodeCellStartTagCs) ? idx + CodeCellStartTagCs.length : nil]
  else
    highlighted
  end
end