Top Level Namespace

Defined Under Namespace

Modules: Jazzy Classes: Array, String

Constant Summary collapse

'36f8f5912051ae747ef441d6511ca4cb'

Instance Method Summary collapse

Instance Method Details



21
22
23
24
25
26
27
28
29
# File 'lib/jazzy/sourcekitten.rb', line 21

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