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

Sam Whited sam at samwhited.com
Fri Nov 6 19:02:22 UTC 2020


To clarify, I think your logic is what I was thinking when I put that
example in initially. My thought that I was wrong mostly stems from
"Characters that would be styling directives but do not follow these
rules are not considered when matching and thus may be present between
two other styling directives."

The middle asterisk does not follow the rules (there is no text between
it and the previous opening styling directive), therefore it is not
considered when matching and may exist between two styling directives.

But I'm still not 100% convinced by either reasoning and am trying to
think how to clarify the situation.

—Sam

On Fri, Nov 6, 2020, at 13:49, Sam Whited wrote:
> But there is intervening text, the middle one you just decided was
> text and not a styling directive. Are you suggesting it doesn't count
> as text, and doesn't count as a closing directive? If so, what is it?
>
> Seems like I definitely need to clarify the rules a bit either way.
>
> —Sam
>
> On Fri, Nov 6, 2020, at 12:49, Tedd Sterr wrote:
> >  Input = ***
> >
> > Current = * (index 0) Lookahead = * (index 1)
> >
> > Is current a styling directive? No, because lookahead indicates no
> > intervening text.
> >
> > Current = * (index 1) Lookahead = * (index 2)
> >
> > Is current a styling directive? No, because lookahead indicates no
> > intervening text.
> >
> > Current = * (index 2) Lookahead = EOS
> >
> > Is current a styling directive? No, because lookahead indicates end
> > of string.
> >
> >
> >
> > 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 directive).
> >
> > Does that actually make sense?
> >
> > _______________________________________________
> > Standards mailing list Info:
> > https://mail.jabber.org/mailman/listinfo/standards Unsubscribe: Standards-
> > unsubscribe at xmpp.org
> > _______________________________________________
> >
>
> --
> Sam Whited
> _______________________________________________
> 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