Details
-
Improvement
-
Resolution: Fixed
-
Major
-
14.2.1
-
None
Description
Proposal 1: Copy the class values from the Image into the figure.
Proposal 2: Link parameters prefixed with figure- must be lifted to the figure tag in case of caption
Not much, this is the code where you would need to get and remove the parameters from the image and add them to the figure: https://github.com/xwiki/xwiki-rendering/blob/93a26775738641848570047d123a7cd135248a88/xwiki-rendering-syntaxes/xwiki-rendering-syntax-wikimodel/src/main/java/org/xwiki/rendering/internal/parser/wikimodel/DefaultXWikiGeneratorListener.java#L733 and this is the code where you would need to take those parameters from the figure, add the prefix and add them to the image parameters: https://github.com/xwiki/xwiki-rendering/blob/1ea8989af966f697c07d0ef72b9959652cad4afd/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xwiki20/src/main/java/org/xwiki/rendering/internal/renderer/xwiki20/XWikiSyntaxChainingRenderer.java#L761 - alternatively, you could put this code in StackingFigureContentChainingListener (https://github.com/xwiki/xwiki-rendering/blob/a05b32c458b753c11c35d8f8c577a99e8c679007/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xwiki20/src/main/java/org/xwiki/rendering/internal/renderer/xwiki20/StackingFigureContentChainingListener.java#L41)
So basically we have all information in one place, we just need code to add/remove the prefix and move the parameters from one map into another.