From 4949043df964e81c351d8a7016ef0cee613873dd Mon Sep 17 00:00:00 2001 From: HarveyKandola Date: Sun, 29 Jul 2018 14:08:39 -0400 Subject: [PATCH] Pre-process section types for HTML export --- domain/document/export.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/domain/document/export.go b/domain/document/export.go index 4da050f7..5e488c9b 100644 --- a/domain/document/export.go +++ b/domain/document/export.go @@ -230,7 +230,6 @@ func exportDocument(ctx domain.RequestContext, s domain.Store, spaceID string, d // Turn each document into TOC entry and HTML content export b := strings.Builder{} for _, documentID := range document { - fmt.Println(documentID) for _, d := range docs { if d.RefID == documentID { if permission.CanViewDocument(ctx, s, d.RefID) { @@ -309,9 +308,15 @@ func processDocument(ctx domain.RequestContext, s domain.Store, documentID strin b.WriteString("") b.WriteString("") + // Process seciton content before writing out as HTML. + section := page.Body + if page.ContentType == "plantuml" { + section = fmt.Sprintf(``, page.Body) + } + // Write out section content b.WriteString(`
`) - b.WriteString(page.Body) + b.WriteString(section) b.WriteString("
") }