Skip to content

Commit

Permalink
Fix escaped string in generated document
Browse files Browse the repository at this point in the history
  • Loading branch information
x-color committed May 16, 2021
1 parent dd224c6 commit bcc5956
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"errors"
"flag"
"fmt"
"html"
"html/template"
"os"
"sort"
Expand Down Expand Up @@ -151,12 +152,14 @@ func main() {
os.Exit(1)
}

doc, err := generateDoc(arg.filename, cfn)
rawDoc, err := generateDoc(arg.filename, cfn)
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}

doc := []byte(html.UnescapeString(string(rawDoc)))

if arg.output == "" {
fmt.Println(string(doc))
return
Expand Down

0 comments on commit bcc5956

Please sign in to comment.