Huh, that’s an interesting idea @Sunskie! I just gave it a try to attempt consolidating that into a single line using replace_2
with_2
but it looks like you need to run the formatting twice at a minimum: once to add the HTML tag and once to swap the curly braces with angle brackets. So this would be a (very slightly) more efficient way of achieving that:
<Set hello>
<a href="https://example.com/">hello</a>
</Set>
<Format replace="{" with="<" replace_2="}" with_2=">">
<Field summary replace="hello" with="{Get hello}" />
</Format>
Still hacky, so we’ll see what the devs come back with to make it possible to work with tags and templates within Format replace
instead of just text strings in a future update. Also just a quick tip: you guys might want to check out this post about formatting your code blocks in Discourse. A bit easier to work with than screenshots