Class: Octopress::Tags::Filter::Tag
- Inherits:
-
Liquid::Block
- Object
- Liquid::Block
- Octopress::Tags::Filter::Tag
- Defined in:
- lib/octopress-filter-tag.rb
Instance Method Summary collapse
-
#initialize(tag_name, markup, tokens) ⇒ Tag
constructor
A new instance of Tag.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, markup, tokens) ⇒ Tag
Returns a new instance of Tag.
9 10 11 12 13 14 15 |
# File 'lib/octopress-filter-tag.rb', line 9 def initialize(tag_name, markup, tokens) super unless markup.strip =~ /^\|/ markup = " | #{markup}" end @markup = " #{markup}" end |
Instance Method Details
#render(context) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/octopress-filter-tag.rb', line 17 def render(context) content = super.strip return content unless markup = TagHelpers::Conditional.parse(@markup, context) if !content.nil? and markup =~ TagHelpers::Var::HAS_FILTERS content = TagHelpers::Var.render_filters(content, $2, context) end content end |