Class: Jekyll::Secinfo::CveTag

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/jekyll-secinfo/cve.rb

Instance Method Summary collapse

Constructor Details

#initialize(tagName, text, tokens) ⇒ CveTag

Returns a new instance of CveTag.



31
32
33
34
# File 'lib/jekyll-secinfo/cve.rb', line 31

def initialize(tagName, text, tokens)
  super
  @text = text
end

Instance Method Details

#render(context) ⇒ Object



36
37
38
39
40
41
# File 'lib/jekyll-secinfo/cve.rb', line 36

def render(context)
  cve_text = @text.strip
  out = Cve.to_link(cve_text, context["site"], context["page"])
  return out if out
  return @text
end