Skip to content

Commit

Permalink
replace consecutive blank lines with a single one to preserve adoc fo…
Browse files Browse the repository at this point in the history
…rmatting
  • Loading branch information
jcantrill committed Jan 5, 2023
1 parent e5e8cac commit c07a51f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ func main() {
return "", errors.Wrap(err, "failed to render the result")
}
// remove trailing whitespace from each html line for markdown renderers
s := regexp.MustCompile(`(?m)^[ \t]+`).ReplaceAllString(b.String(), "")
s := regexp.MustCompile(`(?m)^(\s+){2,}`).ReplaceAllString(b.String(), "\r\n")
//s := regexp.MustCompile(`^(\s*\r\n){2,}`).ReplaceAllString(b.String(), "\r\n")
return s, nil
}

Expand Down

0 comments on commit c07a51f

Please sign in to comment.