Displaying tags in query render

Hi everyone, I need help visualizing the tags of tasks in queries. I’m currently using this template:

* [{{state}}] {{#if deadline < today()}}⚠️OVERDUE⚠️{{else}}{{#if deadline = today()}}📅NOW📅{{else}}📝 {{#if deadline}}{{deadline}} ({{daysTillDate(deadline)}}d){{/if}}{{/if}}{{/if}} [[{{ref}}]] {{name}} {{tags}}

However, it only displays the first tag and I don’t know how to make all tags appear highlighted against the rest of the text.

Can someone please help me figure out how to achieve this?

Does something like this work for you?

* [{{state}}] [[{{ref}}]] {{name}} #{{replace(tags + "", ",", " #")}}