Skip to content

JIRA-70: The Jira macro inserts a paragraph when used in inline mode #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trrenty
Copy link
Contributor

@trrenty trrenty commented Mar 27, 2025

https://jira.xwiki.org/browse/JIRA-70

This issue reproduces when executed inside macros such as version and putfootnote.

In these cases, the MacroTransformationContext stored in the async renderer macro is updated before the asynchronous call of the jira macro. The inline property is updated to true.

@@ -113,6 +113,7 @@ protected Block execute(boolean async, boolean cached)
this.asyncContext.useEntity(this.sourceReference);
}
try {
this.context.setInline(this.inline);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this would need some explanation as I'm not sure I understand the need for this line since at

it's already set.

It feels more like the context is modified somehow somewhere and maybe might need some cloning, but idk, I haven't analysed the problem.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong to me. This is updating the context that is shared with other macros that are currently executed in the main thread and would thus influence the inline state of other currently executed macros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants