mirror of https://github.com/rails/rails
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?'
This commit is contained in:
parent
f54a35c4ea
commit
58a49875df
|
@ -1,5 +1,11 @@
|
||||||
require 'active_support/core_ext/object/inclusion'
|
require 'active_support/core_ext/object/inclusion'
|
||||||
|
|
||||||
|
module RedCloth::Formatters::HTML
|
||||||
|
def emdash(opts)
|
||||||
|
"--"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
module RailsGuides
|
module RailsGuides
|
||||||
module TextileExtensions
|
module TextileExtensions
|
||||||
def notestuff(body)
|
def notestuff(body)
|
||||||
|
|
Loading…
Reference in New Issue