Prevent Maruku from posting so many log warnings

82 Views Asked by At

I use Maruku in Rails simply to convert a Markdown file to HTML so I can use it with Nokogiri. (Maybe there's a better solution for that?) That works fine, but I get lots and lots of "Maruku tells you" messages in the log:

 ___________________________________________________________________________
| Maruku tells you:
+---------------------------------------------------------------------------
| Could not find ref_id = "FIX" for md_link("FIX", nil)
| Available refs are []
+---------------------------------------------------------------------------

That's really confusing and not needed here. Is there a way to silence Maruku so it only warns in the log if there's a real error?

2

There are 2 best solutions below

1
On BEST ANSWER

Maybe try rdiscount gem?

I find Maruku too verbose with errors and do not want to have to ignore all error.

1
On

Looking at the source code and documentation, it looks like you can set :on_error to :ignore :

Maruku.new(string, :on_error => :ignore)

It might also silence "real errors", though.