winterstein / Eclipse-Markdown-Editor-Plugin

Adds Markdown text editing support to Eclipse
Eclipse Public License 1.0
298 stars 73 forks source link

Literate Coffee & other Literate programming languages #36

Open paulvi opened 10 years ago

paulvi commented 10 years ago

(this is old Q and Answer, here for record and reference)

for Literate Coffee http://coffeescript.org/#literate ( was https://github.com/Nodeclipse/nodeclipse-1/issues/26 )

We just need run docco http://jashkenas.github.io/docco/ to produce HTML However making Coffee Editor inside Markdown Editor may be not trivial task.

Would it be simple to add docco option for HTML generation? Could you point quickly to 1 line to change.

If you can do the conversion with a command-line call, then you can set the MarkdownEditor to use that command line.

This is probably the easiest way.

Alternatively: you can implement docco in Java. Or use an embedded javascript engine to run javascript from within Java. With these approaches, you'd then make some minor changes to the Eclipse plugin source code.

paulvi commented 10 years ago

For literate coffee .coffee.md double extension may be better.

In this way we can easily distinguish what language is inside and show rendered sources in Markdown HTML view.

paulvi commented 9 years ago

@winterstein How to use alternative markdown->html converter ? ref #17

winterstein commented 9 years ago

Hello Paul,

Setting a preference to use another markdown converter... You enter a command, and that gets run as a process instead of MarkdownJ. For example, if you had pandoc installed then you could use that, or any other converter which works from the command line. Which means you can use alternative converters, including using a page template if you're converter allows.

This doesn't affect the syntax highlighting -- just the markdown we show in the preview and export.

Command line calls have a couple of gotchas: you can pass in parameters to the command, but this isn't a shell, so you can't use fancy stuff like | pipes or > direction. Also, I haven't tested it on Windows.

Best regards,

On 12 January 2015 at 05:47, Paul Verest notifications@github.com wrote:

@winterstein https://github.com/winterstein How to use alternative markdown->html converter ? ref #17 https://github.com/winterstein/Eclipse-Markdown-Editor-Plugin/issues/17

— Reply to this email directly or view it on GitHub https://github.com/winterstein/Eclipse-Markdown-Editor-Plugin/issues/36#issuecomment-69531815 .

Dr Daniel Winterstein Director

A: CodeBase Argyle House, Edinburgh, EH3 9DR M: +44 (0)772 5172 612 http://sodash.com

paulvi commented 9 years ago

Yes, I generally understand, but we need more detailed help for general user

winterstein commented 9 years ago

Hi Paul,

OK. What do you have in mind -- an explanation and an example on the preference page?

paulvi commented 9 years ago

an explanation and an example in README or wiki page

and more friendly label text in Preference page

The field is it for .jar or system .bat/bash file? The filed should be FileField with File picker button