SouLKev: About the References XEP, is the value of the "end" attribute here https://xmpp.org/extensions/xep-0372.html#usecase_mention intended?
Quoting the XEP: "with 0 being the index of the first character", I feel end='78' should be end='77' instead.
I've created a paste using the text example from the XEP
I've made a server-side implementation for mentions assuming end='77' and now wonder if the XEP needs an update there or I'm missing something :)
KevThe text suggests 77 would be right, doesn't it? Although logically it probably makes more sense to mark the boundaries, like in the example.
KevOtherwise you end up with a single character reference (I don't know if that's sensible, but just to follow the thought through) being begin='12' end='12' or something. Which seems wrong.
SouLIs this text what suggests 77 would be right? "An end attribute is similarly used for the index of the last character of the reference."
Kev(Sorry, my head's not working properly this morning so I'm struggling to follow this)
SouLTo me, begin='12' end='12' does not sound necessarily wrong. From that, I get the reference is just to one single character. I do believe the example should use 77 instead of 78, to avoid confusion. For example if we had "Juliet, is.." there you would not want to include the comma character in the reference (if for example, the client applies some sort of styling to the text being referenced).
SouLI'm aware that the XEP should allow to do things like some sort of April's fools where whenever you write "idiot",
that could add a reference to me, meaning that,
you are free to start and end the reference whenever you want to and also point to whatever JID (or URI) you want to,
but I feel just in the example, it would help to make clear that the intention is to add a reference to "Juliet" and not "Juliet + one more character"
SouLKev I hope what I wrote makes a liiitle bit of sense to you 😄
KevIt does, yes.
KevI'll add sorting this to my TODO for when I can think straight, thanks.