class Mok::Element

Public Instance Methods

anchor_escape(path) click to toggle source

アンカーのhref用の文字列を作る

# File lib/mok2html_element.rb, line 22
def anchor_escape(path)
  CGI.escapeHTML(path.gsub(" ", "%20"))
end
inline_parse_to_str(array) click to toggle source

@inline_parser.parse の配列を文字列に変換する

# File lib/mok2html_element.rb, line 13
def inline_parse_to_str(array)
  str = ""
  array.each do |obj|
    str += obj.apply
  end
  str
end
newline_to_br(str) click to toggle source
# File lib/mok2html_element.rb, line 8
def newline_to_br(str)
  str.gsub("\n", "<br>\n")
end