On Tue, Jan 26, 2010 at 8:32 AM, Josh French <j...@digitalpulp.com> wrote:
>> i'm at loss now for why it's not appearing in the drop down when
>> loaded as a gem. no errors or anything unusual just a missing filter.
>
> I'm actually at a loss as to why it would appear when vendored if
> you're not explicitly loading that subclass. Radiant doesn't do any
> pre-loading of filter subclasses in the way that it automatically
> seeks out and loads Page subclasses. If you look at the textile and
> markdown extensions that ship within core, you'll see that both of
> them explicitly load the filter subclass within their #activate
> methods. It'll be safer to follow their example.

or are you talking about this not being explicit enough?

---
class KramdownFilter < TextFilter
  description_file File.dirname(__FILE__) + "/../markdown.html"
  def filter(text)
    Kramdown::Document.new(RubyPants.new(text).to_html).to_html
  end
end
---

textile_filter
---
class TextileFilter < TextFilter
  description_file File.dirname(__FILE__) + "/../textile.html"
  def filter(text)
    RedCloth.new(text).to_html
  end
end
---

markdown_filter
---
class MarkdownFilter < TextFilter
  description_file File.dirname(__FILE__) + "/../markdown.html"
  def filter(text)
    if defined? RDiscount
      RDiscount.new(text, :smart).to_html
    else
      RubyPants.new(BlueCloth.new(text).to_html).to_html
    end
  end
end
---

again looks the same to me.
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
List Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Radiant: http://radiantcms.org
Extensions: http://ext.radiantcms.org

Reply via email to