Skip to content

Commit

Permalink
Merge pull request #109 from twbs/callout-if
Browse files Browse the repository at this point in the history
re-work callout tag conditional
  • Loading branch information
mdo committed Apr 24, 2015
2 parents 4c3c402 + 58c208e commit 20543d5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docs/_plugins/callout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ class CalloutTag < Liquid::Block

def initialize(tag_name, type, tokens)
super
@type = type
if type == "danger"
@type = "danger"
elsif type == "warning"
@type = "warning"
elsif type == "info"
type.strip!
if %w(info danger warning).include?(type)
@type = type
else
puts "#{type} callout not supported. Defaulting to info"
@type = "info"
end
end
Expand Down

0 comments on commit 20543d5

Please sign in to comment.