[Standards] Need sanity check on an example in XEP-0393: Message Styling

Sam Whited sam at samwhited.com
Fri Nov 6 17:39:13 UTC 2020

So my reasoning here is that if you lazily match to the middle asterisk
in "***" and call it a styling directive, there won't be any text
between them so it's not a styling directive. Then you'd move on to the
next asterisk and the one you just ruled out as a styling directive is
between them (so that one is text and the second asterisk is a styling

Does that actually make sense?


On Fri, Nov 6, 2020, at 12:18, Tedd Sterr wrote:
>  Your very first rule is: "Spans MUST contain text between the two
>  styling directives" which leads to '**' being unstyled. The question
>  is whether the middle asterisk in '***' counts as text (and by
>  extension, multiple middle asterisks.) Another rule is: "Spans are
>  always parsed from the beginning of the byte stream to the end and
>  are lazily matched" which means the first possible match is the
>  correct one, leading to your example '*strong*plain*' - this is
>  essentially the same as '***' but with intervening text, and the
>  first rule requires that intervening text, so these are invalid
>  directives (open followed immediately by close, without intervening
>  text, followed by a dangling open.)
> _______________________________________________
> Standards mailing list Info:
> https://mail.jabber.org/mailman/listinfo/standards Unsubscribe: Standards-
> unsubscribe at xmpp.org
> _______________________________________________

Sam Whited

More information about the Standards mailing list