I'm trying to use YAML macro to heavily reduce chunk of text I repeat across a family of related syntaxes. For example, all of them use the same set of variables, so I write a simple python function common_vars(str) that just return the multiline string containing all those variables. When invoking it in a .yaml-macros I get the problem that i get '\n' printed instead of actual newlines, and '\' at the start of each inserted line.
So, is there any better approach to inserting several lines of text at once than having to write a function that returns an array of lines?
I'm trying to use YAML macro to heavily reduce chunk of text I repeat across a family of related syntaxes. For example, all of them use the same set of variables, so I write a simple python function common_vars(str) that just return the multiline string containing all those variables. When invoking it in a .yaml-macros I get the problem that i get '\n' printed instead of actual newlines, and '\' at the start of each inserted line.
So, is there any better approach to inserting several lines of text at once than having to write a function that returns an array of lines?