From 5f477d21d104b4b7b9f74197988ecc0db650903d Mon Sep 17 00:00:00 2001 From: KMY Date: Sat, 4 Mar 2023 16:19:08 +0900 Subject: [PATCH] Fix blockquote --- app/lib/text_formatter.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/lib/text_formatter.rb b/app/lib/text_formatter.rb index 9417396333..607583ab2f 100644 --- a/app/lib/text_formatter.rb +++ b/app/lib/text_formatter.rb @@ -43,7 +43,9 @@ class TextFormatter end end - html = markdownify(html) + # line first letter for blockquote + p 'DEBUG ' + html.gsub(/^gt;/, '>') + html = markdownify(html.gsub(/^>/, '>')) # html = simple_format(html, {}, sanitize: false).delete("\n") if multiline? html = html.delete("\n") @@ -164,8 +166,7 @@ class TextFormatter # not need filter_html because escape is already done @htmlobj ||= MyMarkdownHTML.new( filter_html: false, - hard_wrap: true, - no_styles: true + hard_wrap: true ) @markdown ||= Redcarpet::Markdown.new(@htmlobj, autolink: false,