Anchor tag inside macro cannot print value

I am trying to add anchor tag inside macro(this macro also creates link) which is in my ftl file.
PFB sample code. Please let me know how to achieve this?

<@cp.nestedlinkcompound>
hello
/@cp.nestedlinkcompound

above code prints “hello”.

if I add anchor tag

<@cp.nestedlinkcompound>

hello

/@cp.nestedlinkcompound

Nothing is printing!!

I suspect this is more about freemarker then about Bloomreach/Hippo? You are probably better off in a freemarker forum.