Uploaded image for project: 'XWiki Rendering'
  1. XWiki Rendering
  2. XRENDERING-636

Previous event information in BlockStateChainingListener is inconsistent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0 M3
    • Fix Version/s: 14.0-rc-1
    • Component/s: API
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Pull Request Status:
      Pull Request accepted
    • Similar issues:

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            MichaelHamann Michael Hamann
            Reporter:
            MichaelHamann Michael Hamann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: