mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-15 09:21:25 +00:00
ef83ec88f5
Improved articles styling Improved bbcode to html formatting HTML and CSS refactorings Moved Extra into concerns Changed repo URL to read-only for deploys Fixes quotes in comments
27 lines
521 B
Ruby
27 lines
521 B
Ruby
BBCoder.configure do
|
|
tag :b, :as => :strong
|
|
|
|
tag :sub, :singular => true do
|
|
%(<sub>#{singular? ? meta : content}</sub>)
|
|
end
|
|
|
|
tag :sup, :singular => true do
|
|
%(<sup>#{singular? ? meta : content}</sup>)
|
|
end
|
|
|
|
tag :ul
|
|
tag :ol
|
|
tag :li, :parents => [:ol, :ul]
|
|
|
|
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
|
|
end
|