Following on from the posts by Geffy I patched my local version of
HAML additionally support RDiscount. I've included the patch below (as
outputted by git format-patch) Hope this is useful (bit of a newb at
patching apologies in advance if I messed up)


Subject: [PATCH] haml patch to use rdiscount

---
 vendor/plugins/haml/lib/haml/filters.rb |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/vendor/plugins/haml/lib/haml/filters.rb b/vendor/plugins/
haml/lib/haml/filters.rb
index cb82a71..a14e076 100644
--- a/vendor/plugins/haml/lib/haml/filters.rb
+++ b/vendor/plugins/haml/lib/haml/filters.rb
@@ -245,10 +245,12 @@ END
     # Uses BlueCloth or RedCloth to provide only Markdown (not
Textile) parsing
     module Markdown
       include Base
-      lazy_require 'bluecloth', 'redcloth'
+      lazy_require 'rdiscount', 'bluecloth', 'redcloth'

       def render(text)
-        if @required == 'bluecloth'
+        if @required == 'rdiscount'
+          ::RDiscount.new(text).to_html
+        elsif @required == 'bluecloth'
           ::BlueCloth.new(text).to_html
         else
           ::RedCloth.new(text).to_html(:markdown)

[END}

All best

Andrew

On Aug 26, 10:24 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> I suppose I should teach Haml about this...
>
> Chris McGrath wrote:
> > On 26 Aug 2008, at 21:27, Chris McGrath wrote:
>
> >> On 26 Aug 2008, at 00:55, apremdas wrote:
>
> >>> This works fine on dev machines running OSX Leopard in development  
> >>> and
> >>> production, but the markdown is not processed on my Ubuntu server. My
> >>> Ubuntu server has the relevant gems installed I think
>
> >>> *** LOCAL GEMS ***  - full list at end of post
> >>> ...
> >>> haml (2.0.1, 2.0.0)
> >>> ...
> >>> RedCloth (4.0.1, 3.0.4)
>
> >>> Any ideas why this might be happening or how to investigate further
> >>> would be most appreciated
>
> >> RedCloth 4.0.1 removed support for Markdown, it's Textile only.
>
> > Well, not specifically 4.0.1, support was removed in 4.0
>
> >> Cheers,
>
> >> Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to