Top Level Namespace

Defined Under Namespace

Modules: Jazzy Classes: String

Constant Summary collapse

'36f8f5912051ae747ef441d6511ca4cb'.freeze

Instance Method Summary collapse

Instance Method Details



17
18
19
20
21
22
23
24
25
# File 'lib/jazzy/sourcekitten.rb', line 17

def autolink_regex(middle_regex, after_highlight)
  start_tag_re, end_tag_re =
    if after_highlight
      [/<span class="(?:n|kt|kd|nc)">/, '</span>']
    else
      ['<code>', '</code>']
    end
  /(#{start_tag_re})[ \t]*(#{middle_regex})[ \t]*(#{end_tag_re})/
end