Top Level Namespace

Includes:
Asciidoctor

Defined Under Namespace

Modules: Context, Jekyll, JekyllAspec, Labels

Constant Summary collapse

CommentBlockRx =
%r(^\/{4,}$)
CommentLineRx =
%r{^//(?=[^/]|$)}

Instance Method Summary collapse

Instance Method Details

#targetify(t) ⇒ Object



18
19
20
# File 'lib/extensions/autoxrefs.rb', line 18

def targetify(t)
  t.downcase.gsub(/(\s|-)/, '_')
end

#titleify(t) ⇒ Object



28
29
30
31
32
# File 'lib/extensions/autoxrefs.rb', line 28

def titleify(t)
  t = t.gsub(/\_/, ' ')
  t = t.lstrip
  t = t.split.map(&:capitalize).join(' ')
end

#trim(s) ⇒ Object



16
17
18
19
# File 'lib/extensions/req_refs.rb', line 16

def trim(s)
  s.gsub!(/_docs\//, '')
  s.gsub!(/(\.adoc|\.md|\.html)/, '')
end

#underscorify(t) ⇒ Object



22
23
24
25
26
# File 'lib/extensions/autoxrefs.rb', line 22

def underscorify(t)
  t = t.downcase.gsub(/(\s|-)/, '_')
  t = t.prepend('_') unless t.match(/^_/)
  t = t.gsub(/___/, '_').delete('`')
end