lib/Charu/ChangeLogMemo.rb in Charu-0.0.8 vs lib/Charu/ChangeLogMemo.rb in Charu-0.0.9
- old
+ new
@@ -1,7 +1,9 @@
# -*- encoding: utf-8 -*-
+require 'redcarpet'
+
module Charu
class Category
attr_accessor :category
def initialize()
@category = []
@@ -90,10 +92,15 @@
if @item_log != nil then
@item_log.chomp! # 文字列最後の改行削除
@item_log.rstrip! # 文字列最後の空白削除
@item_log.strip! # 先頭と末尾の空白文字を除去
- return @item_log.gsub!(/(\r\n|\r\f\n|\r|\n)/, "</p>\n<p>")
+ #@item_log.gsub!(/(\r\n|\r\f\n|\r|\n)/, "</p>\n<p>")
+
+ markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
+ html = markdown.render(@item_log)
+
+ return html
end
return ""
end
def app_item_log(line)