[Standards] Need sanity check on an example in XEP-0393: Message Styling
Tedd Sterr
teddsterr at outlook.com
Fri Nov 6 17:49:56 UTC 2020
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/standards/attachments/20201106/23d491b0/attachment-0001.html>
More information about the Standards
mailing list