Topic: https://brettterpstra.com/2011/07/12/using-textile-in-marked/
hide preview

What's next? verify your email address for reply notifications!

Steffan 13y, 18d ago

After 'sudo gem install RedCloth' I got....

Building native extensions. This could take a while...
ERROR: Error installing RedCloth:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/RedCloth-4.2.9 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/RedCloth-4.2.9/ext/redcloth_scan/gem_make.out

As for Perl, that is a mystery to me...

hide preview

What's next? verify your email address for reply notifications!

Chuck McKnight 13y, 194d ago

I've followed the instructions for adding textile to Marked, but I'm somehow not getting it to work. I verified at the command line that both the Perl textile application and RedCloth applications do the correct conversion. However, Marked only shows it as two paragraphs without the correct markup. I've verified that the paths to the two applications are correct, so I'm a bit lost at this point.

Thanks!

hide preview

What's next? verify your email address for reply notifications!

Dan Michael 13y, 249d ago

Thanks. I'm not into Ruby, but putting together a CLI was really simple: https://gist.github.com/108...
The parser is actually quite good, and even handles references in some cases, while not all.

At first I only got a blank window in Marked, but it was just a PATH issue. With some help from
http://stackoverflow.com/qu... I got it working.

A few other things that would be cool:
- Allowing for different processors for different extensions (or remove the extension limitation altogether..)
- enable copy/paste in the "custom markdown processor" text field in Prefs
- an error message when the processor fails, not just a blank window

hide preview

What's next? verify your email address for reply notifications!

Dan Michael 13y, 249d ago

While simple, this program is actually quite useful! Do you know a MediaWiki command line parser?

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 13y, 249d ago

There's a Ruby lib called WikiCloth that would be a good start (http://code.google.com/p/wi..., but I haven't used it and I'm not sure if there's a CLI for it.

hide preview

What's next? verify your email address for reply notifications!

Giovanni Lanzani 13y, 252d ago

Hey, and would there be a way to preview LaTeX in marked? That would so increase the number of buyers…

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 13y, 252d ago

I'll look into it, but it's not likely with the current manifestation, I'm afraid.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

Mike 13y, 241d ago

Pandoc (http://johnmacfarlane.net/p... would be an option, as it reads every text format under the sun, and outputs to html (among others). Unforunately, support for it right now is really flakey (command line options aren't passed for some reason).

If Marked could officially support Pandoc, it would make the product useful to many more people.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

Brett 13y, 240d ago

Just create a shell script with the necessary command line options and call that instead of calling Pandoc directly.

hide preview

What's next? verify your email address for reply notifications!