Skip to content

Commit

Permalink
notextile tag has been placed with ascii quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
judearasu committed Jul 19, 2011
1 parent 2f69469 commit 3e6052a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions railties/guides/rails_guides/generator.rb
Expand Up @@ -227,13 +227,13 @@ def with_workaround_for_notextile(body)
end end


code_blocks.push(<<HTML) code_blocks.push(<<HTML)
<notextile> &lt;notextile&gt;
<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>
</notextile> &lt;/notextile&gt;
HTML HTML
"\ndirty_workaround_for_notextile_#{code_blocks.size - 1}\n" "\ndirty_workaround_for_notextile_#{code_blocks.size - 1}\n"
end end
Expand Down Expand Up @@ -280,3 +280,4 @@ def check_fragment_identifiers(html, anchors)
end end
end end
end end

5 changes: 3 additions & 2 deletions railties/guides/rails_guides/textile_extensions.rb
Expand Up @@ -25,7 +25,7 @@ def tip(body)


def plusplus(body) def plusplus(body)
body.gsub!(/\+(.*?)\+/) do |m| body.gsub!(/\+(.*?)\+/) do |m|
"<notextile><tt>#{$1}</tt></notextile>" "&lt;notextile&gt;<tt>#{$1}</tt>&lt;/notextile&gt;"
end end


# The real plus sign # The real plus sign
Expand All @@ -36,8 +36,9 @@ def code(body)
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
%{<notextile><div class="code_container"><code class="#{css_class}">#{es}</code></div></notextile>} %{&lt;notextile&gt;<div class="code_container"><code class="#{css_class}">#{es}</code></div>&lt;/notextile&gt;}
end end
end end
end end
end end

0 comments on commit 3e6052a

Please sign in to comment.