class HTML::Pipeline::EmphFilter

Public Instance Methods

call() click to toggle source
# File lib/html/pipeline/bungo/emph_filter.rb, line 5
def call
  emph_dot_filter(@text)
end

Private Instance Methods

emph_dot_filter(text) click to toggle source
# File lib/html/pipeline/bungo/emph_filter.rb, line 11
def emph_dot_filter(text)
  text.gsub(/:([^:\(\)\|\!]+?)\|/) do |match|
    literals = $1.split(//).map{|lt| "<span class='boten'>#{lt}</span>"}
    "<span class='botenparent'>#{literals.join}</span>"
  end
end