I want to define a handler that I can call like this:
log format("Hello {}", "World") -- #> Hello World
log format("Hello {}, {}", {"World", "Again"}) -- #> Hello World, Again
I defined it in SDEF:
<command name="format" code="RTSUFRMT" description="">
<direct-parameter type="text" description="Python style string interpolation"/>
<parameter name="with" code="WiTo" type="list or text" description="..."/>
<documentation>
<html>
<![CDATA[<p>format("Hello {}", "world"R<p>]]>]
</html>
</documentation>
</command>
And unfortunately my handler, while still functions correctly, automatically got rewritten like this:
on format {sourceText, tokens}
....
end format
How do I make it retain the syntax handler("Hello", "World")
, instead of format {"Hello {}", "World"}
?