Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Do not output br tags
Browse files Browse the repository at this point in the history
  • Loading branch information
charith-elastic committed Sep 12, 2019
1 parent ffeeab4 commit 12ac05c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,11 @@ func renderComments(s []string, markdown bool) string {
// we treat this as a HTML tag with markdown renderer below. solve this.
return string(blackfriday.Run([]byte(doc)))
}
return nl2br(doc)
return doc
}

func safe(s string) template.HTML { return template.HTML(s) }

func nl2br(s string) string {
return strings.Replace(s, "\n\n", string(template.HTML("<br/><br/>")), -1)
}

func hiddenMember(m types.Member, c generatorConfig) bool {
for _, v := range c.HiddenMemberFields {
if m.Name == v {
Expand Down

0 comments on commit 12ac05c

Please sign in to comment.