Skip to content

Instantly share code, notes, and snippets.

@jstrachan
Created March 16, 2010 14:05
Show Gist options
  • Select an option

  • Save jstrachan/333984 to your computer and use it in GitHub Desktop.

Select an option

Save jstrachan/333984 to your computer and use it in GitHub Desktop.
def tag(context: RenderContext)(body: => Unit) = {
val text = context.capture(body)
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