[Kde-pim] Markdown Renderer for KMail

Ingo Klöcker kloecker at kde.org
Tue Jan 6 19:33:03 GMT 2015


On Monday 05 January 2015 04:32:50 Jacky Alciné wrote:
> Hey KDE PIM,
> 
> I’ve noticed that the default format for most email-formatted mail tends to
> be similar to Markdown[1]. It makes sense since it’s based on that. I was
> curious if for plain text emails, if something like that could be used to
> render the email.

Yes and no. Some aspects of Markdown could probably be supported (e.g. most or 
all of the block elements), but (IMO) supporting other Markdown features, e.g. 
rendering inline HTML, is out of question (way too dangerous) or questionable 
(e.g. links because this could be used for phishing attacks).

Also, KMail already supports some emphasis markers, e.g. *bold* /italic/ 
_underlined_ which seem to be incompatible with Markdown's syntax (where * and 
_ both become <em> and ** and __ both become <strong>).


> I might not be 100% clear so feel free to prod my mind. I’m also not sure
> how one would go about adding rendering capabilities to email in KMail so
> this serves as an email with two questions.

The code which implements the above mentioned emphasis markers has very 
recently been moved as KTextToHTML to KCoreAddons. Before it was implemented 
in LinkLocator (because it also implements highlighting of links/URLs). This 
could be probably be extended or (optionally, i.e. configurable in KMail) be 
replaced with a stripped down Markdown renderer.

Many years ago we also had the plan to make it possible to write plugins 
implementing rendering for certain types of text attachments (including the 
actual message body), but except for a prototypical renderer for diffs nothing 
came out of this.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20150106/26d0d972/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list