Methods
- B
- N
- P
Attributes
[R] | h | |
[R] | template |
Class Public methods
new(template, options = {})
Link
Source: show
# File lib/redcarpet/render/gitlab_html.rb, line 6 def initialize(template, options = {}) @template = template @project = @template.instance_variable_get("@project") super options end
Instance Public methods
block_code(code, language)
Link
Source: show
# File lib/redcarpet/render/gitlab_html.rb, line 12 def block_code(code, language) options = { options: {encoding: 'utf-8'} } options.merge!(lexer: language.downcase) if Pygments::Lexer.find(language) # New lines are placed to fix an rendering issue # with code wrapped inside <h1> tag for next case: # # # Title kinda h1 # # ruby code here # " <div class="#{h.user_color_scheme_class}">#{Pygments.highlight(code, options)}</div> " end