This issue has been created
 
 
Confluence / cid:jira-generated-image-avatar-d192b1aa-ed6a-474d-9f95-a86800bb15b2 CONFLUENCE-487 Open

Extraneous empty line after the beginning of a link containing a macro

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-2f9c6d50-a9be-400f-a495-54a9f2af9e2e Raphaël Jakse created this issue on 21/Jul/25 14:33
 
Summary: Extraneous empty line after the beginning of a link containing a macro
Issue Type: cid:jira-generated-image-avatar-d192b1aa-ed6a-474d-9f95-a86800bb15b2 New Feature
Affects Versions: 9.87.3
Assignee: Unassigned
Components: Syntax - XHTML
Created: 21/Jul/25 14:33
Priority: cid:jira-generated-image-static-major-cfbf9236-ee97-4592-a889-9be10b226abb Major
Reporter: Raphaël Jakse
Description:

The following Confluence XHTML: 

<div>
    <a href="https://perdu.com">
      <ac:structured-macro ac:name="random-macro">
        <ac:parameter ac:name="param">value</ac:parameter>
      </ac:structured-macro>
    </a>
</div>

Produces the following events (which seems correct):

beginDocument
beginGroup
beginParagraph
beginLink [Typed = [true] Type = [url] Reference = [https://perdu.com]] [false] [[shape]=[rect]]
onMacroStandalone [random-macro] [param=value]
endLink [Typed = [true] Type = [url] Reference = [https://perdu.com]] [false] [[shape]=[rect]]
endParagraph
endGroup
endDocument
 

But this leads to the following, which confuses XWiki's WYSIWYG editor:

(((
[[

{{random-macro param="value"/}}>>url:https://perdu.com||shape="rect"]]
)))

Expected:

 
                              

(((
[[{{random-macro param="value"/}}>>url:https://perdu.com||shape="rect"]]
)))

This seems to be because the beginning of a paragraph is enforced inside the link, although the link is already in a paragraph.