Skip to content

Conversation

@robheittman
Copy link

Toto is great! I wanted to run toto under a bare JRuby rackup, which generally just seems to need the maruku support already added in for Win32. The first of the 2 commits in this fork does that. But I was not able to get maruku to work with the same option passing behavior as Markdown, so the second commit disables it; this might be a bad idea; at least it could be done prettier. But it worked, and Dorothy's been deployed to an app server. Let me know if there is anything else I can do to get JRuby support included upstream. Thanks!

A better solution to this should be possible; this just elides the
option-passing from Maruku invocations on jruby/win.  Not very DRY,
but gets the point across.
@ixti
Copy link

ixti commented Aug 11, 2011

Maruku also supports options, but they are different. Please try to revert your changes (except win32|java) and pass to your toto config:

  set :markdown, {}

Alternative way (which I prefer) is to improve the way Markdown.new is being called. I don't understand why it passes [] when options are true, so I propose to replace 44th line:

Markdown.new(text.to_s.strip, *(options.eql?(true) ? [] : options)).to_html

with

Markdown.new(text.to_s.strip, *(options.eql?(true) ? {} : options)).to_html

I believe both variants will help you. Unfortunately I can't test by myself as Win32 and JRuby are out of scope of waht I'm interested in, and I have neither Win32 system nor JRuby :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants