Skip to content

Instantly share code, notes, and snippets.

@chirino
Created March 16, 2010 13:16
Show Gist options
  • Save chirino/333950 to your computer and use it in GitHub Desktop.
Save chirino/333950 to your computer and use it in GitHub Desktop.
def mytag(body: => Unit) = {
val context = RenderContext()
val text = context.capture(body)
println("Evaluated text: " + text)
context << ("<h3>Wrapped body</h3><p>" + text + "</p><h3>End of wrapped body</h3>")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment