# Module: YARD::Templates::Helpers::HtmlSyntaxHighlightHelper

Includes:
  ModuleHelper

Included in:
  HtmlHelper

Defined in:
  lib/yard/templates/helpers/html_syntax_highlight_helper.rb

## Overview

Helper methods for syntax highlighting.

## Instance Method Summary collapse

- #html_syntax_highlight_ruby(source) ⇒ String

  Highlights Ruby source.

### Methods included from ModuleHelper

#prune_method_listing

## Instance Method Details

### #html_syntax_highlight_ruby(source) ⇒ `String`

Highlights Ruby source

Parameters:

- source (`String`) —

  the Ruby source code

Returns:

- (`String`) —

  the highlighted Ruby source

    12
    13
    14
    15
    16
    17
    18

    # File 'lib/yard/templates/helpers/html_syntax_highlight_helper.rb', line 12

    def html_syntax_highlight_ruby(source)
      if Parser::SourceParser.parser_type == :ruby
        html_syntax_highlight_ruby_ripper(source)
      else
        html_syntax_highlight_ruby_legacy(source)
      end
    end