[Standards] Syntax Highlighting in XEPs

Florian Schmaus flo at geekplace.eu
Sat Jan 28 17:09:31 UTC 2017


On 28.01.2017 16:50, Sam Whited wrote:
> Hi all,
> 
> Currently there are several XEPs that contain examples of a round trip
> between the client and the server that delineate client sent packets
> and server sent packets with some text similar to this:
> 
> ```
> Client:
> <iq/>
> 
> Server:
> <iq type='result'/>
> ```
> 
> This leads to strange results in the syntax highlighting of the example.
> My initial thought was to replace them with comments (possibly noting
> that the comments were for example only and not valid in an XMPP
> stream if it wasn't obvious from the context):
> 
> ```
> <!-- Client -->
> <iq/>
> 
> <!-- Server -->
> <iq type='result'/>
> ```
> 
> but someone else told me they weren't a fan of that approach. Does
> anyone have opinions on why we should or should not use comments? Any
> alternative ideas?

How about recommending that <example/> only contains a single Stanza or
Nonza, and that sequences should be shown in a sequence diagram (as it's
already done in e.g. http://xmpp.org/extensions/xep-0166.html#howitworks )?

- Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: OpenPGP digital signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20170128/d929deab/attachment.sig>


More information about the Standards mailing list