[MlMt] different markup language plugin?

Charlie Allom charlie at evilforbeginners.com
Sun Jun 26 12:39:05 EDT 2016


On 26 Jun 2016, at 15:47, Benny Kjær Nielsen wrote:

> On 26 Jun 2016, at 12:44, Charlie Allom wrote:
>
>> Can I replace Markdown with a self-made plugin for another markup 
>> language? Just the same output styles is sufficient.
>
> Markdown is perfect for emails since it is based on email tradition. 
> In other words, even if Markdown is not converted to HTML then it's 
> (mostly) readable. MailMate marks outgoing emails as being based on 
> Markdown and MailMate itself uses this to be smarter when 
> replying/forwarding such emails. It would be quite bad if something is 
> marked as Markdown when it isn't.

Thank you for the considered reply.

I hadn’t realised this!

What I had come up with was [`j2m`](https://github.com/FokkeZB/J2M) in 
front of the `sundown` conversion, first, so as not to upset the 
MailMate workflow. It converts JIRA to Markdown, so I can keep ~one 
method in my brain. (yes github markdown for now).

I had something in mind like replacing 
`/Applications/MailMate.app/Contents/SharedSupport/bin/sundown` with a 
script that piped my JIRA-style md through `j2m` to a github-style md.. 
which was then picked up by the real `sundown` binary, just by piping 
them through each other. If that worked I’d write my own `j2m` style 
pipe script that wasn’t github specific.

It isn’t working.

If I replace the `sundown` binary with this script, the composing window 
immediately loses it’s HTML preview. I can’t find out how to get 
debug logs to find out what MlMt is expecting or erroring on :)


~~~bash
  #!/bin/bash
cat | /usr/local/bin/j2m -m --stdin | /Users/charlie/bin/sundown
~~~

In the shell it works:

~~~
% echo '{{pre}} and `pre`' | 
/Applications/MailMate.app/Contents/SharedSupport/bin/sundown
<p dir="auto"><code>pre</code> and <code>pre</code></p>
~~~

> Slightly off topic, I'm strongly considering switching from `sundown` 
> to `CommonMark`, but the latter does not support any kind of tables. 
> I'll be interested if anyone has a solution to this problem.

How about https://github.com/hoedown/hoedown ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20160626/35c7d31c/attachment.html>


More information about the mailmate mailing list