2014-03-30 19:50:52 +00:00
|
|
|
BBCoder.configure do
|
2014-05-02 16:43:23 +00:00
|
|
|
tag :i, as: :em
|
|
|
|
tag :b, as: :strong
|
2014-03-30 19:50:52 +00:00
|
|
|
|
2014-05-02 16:43:23 +00:00
|
|
|
tag :sub, singular: true do
|
2014-03-30 19:50:52 +00:00
|
|
|
%(<sub>#{singular? ? meta : content}</sub>)
|
|
|
|
end
|
|
|
|
|
2014-05-02 16:43:23 +00:00
|
|
|
tag :sup, singular: true do
|
2014-03-30 19:50:52 +00:00
|
|
|
%(<sup>#{singular? ? meta : content}</sup>)
|
|
|
|
end
|
|
|
|
|
|
|
|
tag :ul
|
|
|
|
tag :ol
|
2014-05-02 16:43:23 +00:00
|
|
|
tag :li, parents: [:ol, :ul]
|
2014-03-30 19:50:52 +00:00
|
|
|
|
|
|
|
tag :size do
|
|
|
|
%(<span style="font-size: #{meta}px;">#{content}</span>)
|
|
|
|
end
|
|
|
|
|
|
|
|
tag :url do
|
|
|
|
if meta.nil? || meta.empty?
|
|
|
|
%(<a href="#{content}">#{content}</a>)
|
|
|
|
else
|
|
|
|
%(<a href="#{meta}">#{content}</a>)
|
|
|
|
end
|
|
|
|
end
|
2014-05-02 16:43:23 +00:00
|
|
|
|
|
|
|
tag :color do
|
|
|
|
%(<span style="color: #{meta};">#{content}</span>)
|
|
|
|
end
|
2014-04-12 01:35:42 +00:00
|
|
|
end
|