gjtorikian / html-pipeline

HTML processing filters and utilities
MIT License
2.27k stars 383 forks source link

uninitialized constant HTMLPipeline::ConvertFilter::MarkdownFilter #416

Closed steviee closed 1 month ago

steviee commented 1 month ago

I get this NameError when trying to use the MarkdownFilter within a view helper:

# frozen_string_literal: false

require 'html_pipeline'

module HomeHelper
  def markdown
    @markdown ||= HTMLPipeline::ConvertFilter::MarkdownFilter.new
  end
end

This is basically the whole thing. My app is a Rails 7.1 app using Zeitwerk.

Versions used by my app:

html-pipeline (3.2.1)
  selma (~> 0.4)
  zeitwerk (~> 2.5)
gjtorikian commented 1 month ago

Try:

require "html_pipeline"
require "html_pipeline/convert_filter/markdown_filter"

Closing, but feel free to reopen if this didn't fix it.