helpers/dataminer_helpers.rb
# Syntax highlighting for SQL using Rouge.
#
# @param sql [String] the sql.
# @return [String] HTML styled for syntax highlighting.
Syntax highlighting for SQL using Rouge.
Syntax highlighting for SQL using Rouge .
def sql_to_highlight(sql)
    theme     = Rouge::Themes::Github.new
    formatter = Rouge::Formatters::HTMLInline.new(theme)
    lexer     = Rouge::Lexers::SQL.new
    formatter.format(lexer.lex(wrapped_sql(sql)))
  end
def sql_to_highlight ( sql ) theme = Rouge :: Themes :: Github . new formatter = Rouge :: Formatters :: HTMLInline . new ( theme ) lexer = Rouge :: Lexers :: SQL . new formatter . format ( lexer . lex ( wrapped_sql ( sql ) ) ) end
Syntax highlighting for SQL using Rouge.
Syntax highlighting for SQL using Rouge .
HTML styled for syntax highlighting.
HTML styled for syntax highlighting .
String
sql
None