1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert "notextile tag has been placed with ascii quotes"

Reason: <notextile> is an internal tag

This reverts commit 01040b5dc9.
This commit is contained in:
Xavier Noria 2011-07-23 12:51:02 +02:00
parent ace3723d2f
commit c300e13a9c
2 changed files with 4 additions and 6 deletions

View file

@ -227,13 +227,13 @@ module RailsGuides
end end
code_blocks.push(<<HTML) code_blocks.push(<<HTML)
&lt;notextile&gt; <notextile>
<div class="code_container"> <div class="code_container">
<pre class="brush: #{brush}; gutter: false; toolbar: false"> <pre class="brush: #{brush}; gutter: false; toolbar: false">
#{ERB::Util.h($2).strip} #{ERB::Util.h($2).strip}
</pre> </pre>
</div> </div>
&lt;/notextile&gt; </notextile>
HTML HTML
"\ndirty_workaround_for_notextile_#{code_blocks.size - 1}\n" "\ndirty_workaround_for_notextile_#{code_blocks.size - 1}\n"
end end
@ -280,4 +280,3 @@ HTML
end end
end end
end end

View file

@ -25,7 +25,7 @@ module RailsGuides
def plusplus(body) def plusplus(body)
body.gsub!(/\+(.*?)\+/) do |m| body.gsub!(/\+(.*?)\+/) do |m|
"&lt;notextile&gt;<tt>#{$1}</tt>&lt;/notextile&gt;" "<notextile><tt>#{$1}</tt></notextile>"
end end
# The real plus sign # The real plus sign
@ -36,9 +36,8 @@ module RailsGuides
body.gsub!(%r{<(yaml|shell|ruby|erb|html|sql|plain)>(.*?)</\1>}m) do |m| body.gsub!(%r{<(yaml|shell|ruby|erb|html|sql|plain)>(.*?)</\1>}m) do |m|
es = ERB::Util.h($2) es = ERB::Util.h($2)
css_class = $1.in?(['erb', 'shell']) ? 'html' : $1 css_class = $1.in?(['erb', 'shell']) ? 'html' : $1
%{&lt;notextile&gt;<div class="code_container"><code class="#{css_class}">#{es}</code></div>&lt;/notextile&gt;} %{<notextile><div class="code_container"><code class="#{css_class}">#{es}</code></div></notextile>}
end end
end end
end end
end end