helpers/dataminer_helpers.rb
# Syntax highlighting for YAML using Rouge.
#
# @param yml [String] the yaml string.
# @return [String] HTML styled for syntax highlighting.
Syntax highlighting for YAML using Rouge.
Syntax highlighting for YAML using Rouge .
def yml_to_highlight(yml)
    theme     = Rouge::Themes::Github.new
    formatter = Rouge::Formatters::HTMLInline.new(theme)
    lexer     = Rouge::Lexers::YAML.new
    formatter.format(lexer.lex(yml))
  end
def yml_to_highlight ( yml ) theme = Rouge :: Themes :: Github . new formatter = Rouge :: Formatters :: HTMLInline . new ( theme ) lexer = Rouge :: Lexers :: YAML . new formatter . format ( lexer . lex ( yml ) ) end
Syntax highlighting for YAML using Rouge.
Syntax highlighting for YAML using Rouge .
HTML styled for syntax highlighting.
HTML styled for syntax highlighting .
String
yml
the yaml string.
the yaml string .