Eclipse-Markdown-Editor-Plugin icon indicating copy to clipboard operation
Eclipse-Markdown-Editor-Plugin copied to clipboard

Literate Coffee & other Literate programming languages

Open paulvi opened this issue 11 years ago • 6 comments

(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 avatar Feb 11 '14 02:02 paulvi

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 avatar Feb 11 '14 02:02 paulvi

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

paulvi avatar Jan 12 '15 05:01 paulvi

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,

  • Daniel

On 12 January 2015 at 05:47, Paul Verest [email protected] 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

winterstein avatar Jan 12 '15 10:01 winterstein

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

paulvi avatar Jan 12 '15 11:01 paulvi

Hi Paul,

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

  • Dan

winterstein avatar Jan 12 '15 12:01 winterstein

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

paulvi avatar Jan 12 '15 15:01 paulvi