Skip to content

Commit

Permalink
pass wrap-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Skeeve committed Jul 22, 2020
1 parent 072de96 commit df5545b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (f *MarkdownFile) Upload(m *Markdown2Confluence) (url string, err error) {

wikiContent := string(dat)
var images []string
wikiContent, images, err = renderContent(f.Path, wikiContent)
wikiContent, images, err = renderContent(f.Path, wikiContent, m.WithHardWraps)

if err != nil {
return url, fmt.Errorf("unable to render content from %s: %s", f.Path, err)
Expand Down
4 changes: 2 additions & 2 deletions lib/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@ func validateInput(s string, msg string) {
}
}

func renderContent(filePath, s string) (content string, images []string, err error) {
func renderContent(filePath, s string, withHardWraps bool) (content string, images []string, err error) {
confluenceExtension := e.NewConfluenceExtension(filePath)
ro := goldmark.WithRendererOptions(
html.WithXHTML(),
)
if m.WithHardWraps {
if withHardWraps {
ro = goldmark.WithRendererOptions(
html.WithHardWraps(),
html.WithXHTML(),
Expand Down

0 comments on commit df5545b

Please sign in to comment.