diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-05-06 01:05:43 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-05-06 01:05:43 +0530 |
commit | 58a49875df63729f07a9a81d1ee349087d258df5 (patch) | |
tree | 2fcc97230e0ec2be6bca91465d75b6a434f2b6da /guides/rails_guides | |
parent | f54a35c4eab3d923f650cdd384b388e1b2a9be11 (diff) | |
download | rails-58a49875df63729f07a9a81d1ee349087d258df5.tar.gz rails-58a49875df63729f07a9a81d1ee349087d258df5.tar.bz2 rails-58a49875df63729f07a9a81d1ee349087d258df5.zip |
Make RedCloth not convert double hyphens to emdashes. Closes #5292
As mentioned in http://redcloth.org/textile/writing-paragraph-text/#dashes
RedCloth converts double hyphens to emdashes. This causes problems in
the guides where options like --database, --full are rendered incorrectly.
This commit fixes it by customizing the emdash method in the
RedCloth::Formatters::HTML module to just return '--'. See their FAQ
http://redcloth.org/faq in the section 'How do I customize RedCloth?'
Diffstat (limited to 'guides/rails_guides')
-rw-r--r-- | guides/rails_guides/textile_extensions.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/guides/rails_guides/textile_extensions.rb b/guides/rails_guides/textile_extensions.rb index 4677fae504..0a002a785f 100644 --- a/guides/rails_guides/textile_extensions.rb +++ b/guides/rails_guides/textile_extensions.rb @@ -1,5 +1,11 @@ require 'active_support/core_ext/object/inclusion' +module RedCloth::Formatters::HTML + def emdash(opts) + "--" + end +end + module RailsGuides module TextileExtensions def notestuff(body) |