dev_forum
SylorHuang 6 years ago
parent b8592a9943
commit c543779cb1

@ -337,7 +337,7 @@ module ApplicationHelper
# 导出pdf时转化markdown为html
def to_markdown(text)
return nil if text.blank?
request_url = request.base_url
request_url = "http://47.96.87.25:48080"
options = {
:autolink => true,
@ -350,7 +350,7 @@ module ApplicationHelper
}
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,options)
m_t = markdown.render(text)
m_t&.include?("src=\"") ? m_t&.gsub("src=\"","src=\"#{request.base_url}") : m_t
m_t&.include?("src=\"") ? m_t&.gsub("src=\"","src=\"#{request_url}") : m_t
Rails.logger.info("###########__________request_url_________###################{request_url}")
end

@ -121,7 +121,7 @@
<div class="pbt10">
<div class="position-relative">
<div class="pbt5">
<span class="mr5 text-blue"><%= q.question_number %>、&nbsp;</span>
<span class="mr5 text-blue"><%= q.question_number %>、&nbsp;</span><%= request.base_url %>
<span class="text-blue">
<%= q.question_type_name %>
</span>

Loading…
Cancel
Save