This issue has been created
 
 
XWiki Rendering / cid:jira-generated-image-avatar-23b1e0c5-691c-45e3-84c9-5349e7ad6204 XRENDERING-766 Open

Macros followed by an empty block with parameters gets wrapped in a span when converted to annotated html

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-e4a9cef1-8f4c-4eb0-bf24-aa3ae62ca6bf Manuel Leduc created this issue on 12/Dec/24 16:46
 
Summary: Macros followed by an empty block with parameters gets wrapped in a span when converted to annotated html
Issue Type: cid:jira-generated-image-avatar-23b1e0c5-691c-45e3-84c9-5349e7ad6204 Bug
Affects Versions: 17.0.0-rc-1
Assignee: Unassigned
Components: Syntax - annotatedhtml/5.0, Syntax - annotatedxhtml/1.0, Syntax - xwiki/2.1
Created: 12/Dec/24 16:46
Priority: cid:jira-generated-image-static-major-eb0525d1-8732-4252-9ada-9d108b88cf36 Major
Reporter: Manuel Leduc
Description:

Note 1: the affects version(s) needs to be refined.
Note 2: this issue is reported in order to fix XWIKI-21973

Reproduction steps

Create a content with a macro followed by a parameter, for instance

{{icon name="add"/}}(% id="test" %)

And converts it to annotated (x)html

Expected

Then parameters produce an empty span after the macro.

p><!--startmacro:icon|-|name="add"--><!--stopmacro-->&nbsp;<span id="test"></span></p>

Actual

The macro is wrapped in a span with the parameters are attributes.

p><span id="test"><!--startmacro:icon|-|name="add"--><!--stopmacro-->&nbsp;</span></p>