3

Is there a way to passing Leaf tag to another Leaf tag? For example, in my custom Leaf tag I return some html code:

public func run(
        tagTemplate: TagTemplate,
        arguments: ArgumentList) throws -> Node? {

        return .bytes("<span>#(foo)</span>".bytes)
}

but in my template #(foo) shows as plain text, not render as a Leaf tag, whereas html tags <span></span> works properly.

Varabaiba
  • 31
  • 1
  • Maybe you can take the tag in as an argument, render the HTML from it, and then pass in the resulting String using interpolation? – Caleb Kleveter Jun 20 '17 at 11:40

0 Answers0