I defiened a very basic xhtml macro for setting a date value which I want to be converted to date picker storage format (resp. date lozenge).
xhtml macro definition:
<xhtml-macro name="helloworld" class="com.atlassian.tutorial.anotherNewPlugin.macro.helloworld" key='helloworld-macro' hide-body="true">
<description key="helloworld.macro.desc"/>
<category name="formatting"/>
<parameters>
<parameter name="Date" type="string"/>
</parameters>
</xhtml-macro>
helloworld.java
public class helloworld implements Macro {
public String execute(Map<String, String> map, String s, ConversionContext conversionContext) throws MacroExecutionException {
String date;
String result = "";
if (map.get("Date") != null) {
date = map.get("Date");
result = "<time datetime=\"" + date + "\"></time>";
}
return result;
}
public BodyType getBodyType() { return BodyType.NONE; }
public OutputType getOutputType() { return OutputType.BLOCK; }
}I would expect this:

But I get this:

Inspecting html source shows this:
<p>
<time datetime="2019-04-04" class="conf-macro output-block" data-hasbody="false" data-macro-name="helloworld"> </time>
</p>
Can anybody please give me a hint what I am doing wrong?