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

List item handling is broken for existing Renderers

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      XRENDERING-490 added a new method to Listener:

          /**
           * Start of a list item.
           * 
           * @param parameters a generic list of parameters for the list item. Example: "style"/"background-color: blue"
           * @since 10.0
           */
          default void beginListItem(@Default("") Map<String, String> parameters)
          {
              beginListItem();
          }
      

      However, it also implemented it in AbstractChainingListener:

          @Override
          public void beginListItem(Map<String, String> parameters)
          {
              ChainingListener next = getListenerChain().getNextListener(getClass());
              if (next != null) {
                  next.beginListItem(parameters);
              }
          }
      

      Thus any Listener/Renderer that extend AbstractChainingListener, such as the Markdown Renderer, will have their existing beginListItem() method not called. Instead the AbstractChainingListener#beginListItem(Map<String, String> parameters) method is called, breaking the support of list items...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tmortagne Thomas Mortagne
                Reporter:
                vmassol Vincent Massol
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: