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 @@ def with_workaround_for_notextile(body)
end
code_blocks.push(<
+<notextile>
-
+</notextile>
HTML
"\ndirty_workaround_for_notextile_#{code_blocks.size - 1}\n"
end
@@ -280,3 +280,4 @@ def check_fragment_identifiers(html, anchors)
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 @@ def tip(body)
def plusplus(body)
body.gsub!(/\+(.*?)\+/) do |m|
- "#{$1}"
+ "<notextile>#{$1}</notextile>"
end
# The real plus sign
@@ -36,8 +36,9 @@ def code(body)
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
- %{#{es}
}
+ %{<notextile>#{es}
</notextile>}
end
end
end
end
+