The information about the previous event can be called inconsistent at best. I found the following issues:
- Many "on"-Events set the previous event before calling the next listener in the chain, meaning that in an event handler, the renderer will always get its own event instead of the previous event.
- onVerbatim always sets the VERBATIM_STANDALONE event even when inline is true - and not the VERBATIM_INLINE-event (though I'm wondering why there are two versions of this event and not of any other event).
- endMetaData and endGroup are not implemented, meaning that the previous event will never be a metadata or group event.
There are also no unit tests that could have identified these issues. In xwiki-rendering, getPreviousEvent() is only used for quotations, so both the impact of this bug as well as the breaking changes introduced by the fix should be small.