From 58a49875df63729f07a9a81d1ee349087d258df5 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Sun, 6 May 2012 01:05:43 +0530 Subject: [PATCH] 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?' --- guides/rails_guides/textile_extensions.rb | 6 ++++++ 1 file changed, 6 insertions(+) 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)