aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-07-20 04:04:07 -0700
committerXavier Noria <fxn@hashref.com>2011-07-20 04:04:07 -0700
commit4636638bb998cad64e165fe644990db9c92c48a5 (patch)
tree618eb1462e0f7838af5b08365c8db955e8c7cf5a /railties
parent0e6f19cc9bbad22543223550afb3e321309fe07f (diff)
parent01040b5dc990e79052627451603feea0f149fe41 (diff)
downloadrails-4636638bb998cad64e165fe644990db9c92c48a5.tar.gz
rails-4636638bb998cad64e165fe644990db9c92c48a5.tar.bz2
rails-4636638bb998cad64e165fe644990db9c92c48a5.zip
Merge pull request #2136 from judearasu/guides_branch
notextile tag in rails guides generator has been placed with ascii quotes
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/rails_guides/generator.rb5
-rw-r--r--railties/guides/rails_guides/textile_extensions.rb5
2 files changed, 6 insertions, 4 deletions
diff --git a/railties/guides/rails_guides/generator.rb b/railties/guides/rails_guides/generator.rb
index 14d671c8f3..2219fcea66 100644
--- a/railties/guides/rails_guides/generator.rb
+++ b/railties/guides/rails_guides/generator.rb
@@ -227,13 +227,13 @@ module RailsGuides
end
code_blocks.push(<<HTML)
-<notextile>
+&lt;notextile&gt;
<div class="code_container">
<pre class="brush: #{brush}; gutter: false; toolbar: false">
#{ERB::Util.h($2).strip}
</pre>
</div>
-</notextile>
+&lt;/notextile&gt;
HTML
"\ndirty_workaround_for_notextile_#{code_blocks.size - 1}\n"
end
@@ -280,3 +280,4 @@ HTML
end
end
end
+
diff --git a/railties/guides/rails_guides/textile_extensions.rb b/railties/guides/rails_guides/textile_extensions.rb
index 352c5e91dd..dd51e0d66b 100644
--- a/railties/guides/rails_guides/textile_extensions.rb
+++ b/railties/guides/rails_guides/textile_extensions.rb
@@ -25,7 +25,7 @@ module RailsGuides
def plusplus(body)
body.gsub!(/\+(.*?)\+/) do |m|
- "<notextile><tt>#{$1}</tt></notextile>"
+ "&lt;notextile&gt;<tt>#{$1}</tt>&lt;/notextile&gt;"
end
# The real plus sign
@@ -36,8 +36,9 @@ module RailsGuides
body.gsub!(%r{<(yaml|shell|ruby|erb|html|sql|plain)>(.*?)</\1>}m) do |m|
es = ERB::Util.h($2)
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
+