[Standards] Markdown in XMPP IM

Peter Waher peterwaher at hotmail.com
Wed Jan 6 14:29:31 UTC 2016


Hello Matthew, Florian & others
 
Thanks for your input. Regarding your comments:

> >> Isn't the point of markdown that it's perfectly readable as plain text,
> >> ie that there is no markup? I'd think sending straight markdown would
> >> be just fine.
> >
> > The point of markdown is that it's easy to write and edit (focus is not
> > reading, even though it's somewhat readable as well). I thought about
> > sending markdown just as-is as well, but after thinking about it for a while
> > decided against it.
> 
> Sorry, this is definitely incorrect.
> 
> >From the author's site ( https://daringfireball.net/projects/markdown/ ):
> 
> "Markdown allows you to write using an easy-to-read, easy-to-write
> plain text format [...]"
> 
> and
> 
> "The overriding design goal for Markdown?s formatting syntax is to
> make it as readable as possible. The idea is that a Markdown-formatted
> document should be publishable as-is, as plain text, without looking
> like it?s been marked up with tags or formatting instructions."

Interesting to see how different people read the same text and come out with different conclusions. From the same page:
 
"Markdown’s syntax is intended for one purpose: to be used as a format for writing for the web."
 
and
 
"The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format."
 
So, the main purspose, and why it is used in CMS systems, is because it should be as easy to write as possible, and yet, be as easy to read as possible, under those circumstances. (If writability was not the main concern, other ways create results that are easier to read.)
 
> 
> If you ask me, the best thing to do here would be to define a way to
> declare a message's body explicitly as being in Markdown syntax. Then
> clients will ignore that tag it and display it as text, unless they
> understand the tag, then they'll know they can run it through a
> Markdown processor and display a formatted version.
 
I was thinking along these lines as well, and Steven also, in his reply.

> Alternatively, if it's just about easier input, support Markdown on
> the sending side and use XHTML-IM. I don't think we really need more
> ways of formatting messages.
 
You would not be able to recover the markdown this way, which might be of interest (see my response earlier).

 
> > 
> > If you ask me, the best thing to do here would be to define a way to
> > declare a message's body explicitly as being in Markdown syntax. Then
> > clients will ignore that tag it and display it as text, unless they
> > understand the tag, then they'll know they can run it through a
> > Markdown processor and display a formatted version.
> 
> I wonder if this is even necessary. Maybe markdown libraries are able
> tell if a given String is in markdown or not. Worst thing that could
> happen are false positives, and I do think that this won't be often the
> case.
 
This is definitely possible. It it might also be undesireable, as if a non-markdown-compliant client sending a message to a markdown-compliant client. Such text should be displayed as normal text.

> 
> I do not see any reason to wrap markdown in an extra element like it is
> done with XHTML-IM. I would simply put it into <body/>.
 
That would force clients to support XHTML-IM, which, in the case of choosing markdown in the first place, might be undesireable.

Best regards,
Peter Waher

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/standards/attachments/20160106/591bab7b/attachment.html>


More information about the Standards mailing list