Skip to content

Instantly share code, notes, and snippets.

@chirino
Created March 16, 2010 13:17
Show Gist options
  • Save chirino/333951 to your computer and use it in GitHub Desktop.
Save chirino/333951 to your computer and use it in GitHub Desktop.
def mytag(body: => Unit) = {
import RenderContext()
val text = capture(body)
println("Evaluated text: " + text)
<< ("<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