diff --git a/render/render.go b/render/render.go index c072eb4..c907dc3 100644 --- a/render/render.go +++ b/render/render.go @@ -47,7 +47,9 @@ func (n *BlockNode) render(w *trimWriter, ctx nodeContext) Error { if renderer == nil { panic(fmt.Errorf("unset renderer for %v", n)) } + w.TrimLeft(n.TrimLeft) err := renderer(w, rendererContext{ctx, nil, n}) + w.TrimRight(n.TrimRight) return wrapRenderError(err, n) }