On 12/4/20 1:31 PM, JC Brand wrote:
Hey folks

In XEP-0372 in section 3.1, there is the following text:

An end attribute is similarly  used for the index of the last character of the reference

However, in the example in 3.2, the "end" attribute is set to 78, which is the index of the space after the nickname "Juliet".

Yep, that should be 77 and the XEP should explicitly state that the end index is exclusive (while the start index is inclusive). Together with the numbering being zero-indexed, this would be similar to the behavior of APIs like Android's android.text.Spannable.

While at it, the textual <body/> content of the examples in the XEP should be way shorter. And it should be explicitly explained which part of the text is referenced, e.g.:

Text is spantastic!
        ^^^^
begin=8
  end=12

- Florian




Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: standards-unsubscr...@xmpp.org
_______________________________________________

Reply via email to