Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
cxt 6 years ago
commit 52bf60c247

@ -335,6 +335,7 @@ module ApplicationHelper
end end
def to_markdown(text) def to_markdown(text)
Rails.logger.info("#########################text______________tedxt_________________###{text}")
return nil if text.blank? return nil if text.blank?
options = { options = {
:autolink => true, :autolink => true,
@ -345,9 +346,11 @@ module ApplicationHelper
:superscript => true, :superscript => true,
:tables => true :tables => true
} }
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,options) markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,options)
markdown.render(text).html_safe ss = markdown.render(text)
Rails.logger.info("#########################text______________markdown.render(text)________________###{ss}")
ss
end end
end end

@ -75,10 +75,10 @@
<% q_name = q_markdown_name&.include?("src=\"") ? q_markdown_name&.gsub("src=\"","src=\"#{@request_url}")&.html_safe : q_markdown_name %> <% q_name = q_markdown_name&.include?("src=\"") ? q_markdown_name&.gsub("src=\"","src=\"#{@request_url}")&.html_safe : q_markdown_name %>
<span class="ques-title" id="ques_marked_<%= index %>"><%= q_name %></span> <span class="ques-title" id="ques_marked_<%= index %>"><%= q_name %></span>
<div class="mt8 text-gray"> <div class="mt8 text-gray">
<span id="ques_title_<%= index %>"><%= q_title %></span> <span id="ques_title_<%= index %>"><%= q_markdown %></span>
</div> </div>
<% else %> <% else %>
<span class="ques-title" id="ques_title_<%= index %>"><%= q_title %></span> <span class="ques-title" id="ques_title_<%= index %>"><%= q_markdown %></span>
<% end %> <% end %>
</div> </div>
<div class="pbt5"> <div class="pbt5">

Loading…
Cancel
Save