我安装了带有 Coderay 的 RedCloth,以突出显示我在博客中粘贴的代码。
如果我粘贴一些这样的代码:
CodeRay.scan(
"set_meta_tags :og => {
:title => @blog.title,
:type => 'article',
:url => current_url,
:image => @blog.blog_images.first.image.url,
:article => {:published_time => @blog.created_at.to_time.iso8601,
:modified_time => @blog.updated_at.to_time.iso8601,
:author => 'Name',
:section => @blog.categories.first.name,
:tags => @blog.categories.map(&:name).join(', ')
}}",
:ruby).div(:css => :class)
我懂了
set_meta_tags :og => {
:title => blog</span>.title,
<span class="symbol">:type</span> => <span class="string"><span class="delimiter">'</span><span class="content">article</span><span class="delimiter">'</span></span>,
<span class="symbol">:url</span> => current_url,
<span class="symbol">:image</span> => <span class="instance-variable">blog.blog_images.first.image.url,
:article => {:published_time => blog</span>.created_at.to_time.iso8601,
<span class="symbol">:modified_time</span> => <span class="instance-variable">blog.updated_at.to_time.iso8601,
:author => ‘Name’,
:section => blog</span>.categories.first.name,
<span class="symbol">:tags</span> => <span class="instance-variable">blog.categories.map(&:name).join(‘, ’)
}}
我怎样才能摆脱它?
非常感谢