Post is working now
This commit is contained in:
@@ -27,14 +27,6 @@ func (p *Post) HTMLPage() string {
|
||||
var content string
|
||||
if p.GemtextContent.Valid {
|
||||
content = p.GemtextContent.String
|
||||
if strings.HasPrefix(content, "{") {
|
||||
content = strings.TrimPrefix(content, "{")
|
||||
}
|
||||
if strings.HasSuffix(content, "true}") {
|
||||
content = strings.TrimSuffix(content, "true}")
|
||||
}
|
||||
} else {
|
||||
content = ""
|
||||
}
|
||||
|
||||
lines := strings.Split(content, "\n")
|
||||
@@ -61,6 +53,7 @@ func (p *Post) HTMLPage() string {
|
||||
url := parts[0]
|
||||
htmlLines = append(htmlLines, fmt.Sprintf(`<a href="%s.html">%s</a>`, url, url))
|
||||
}
|
||||
|
||||
} else {
|
||||
htmlLines = append(htmlLines, "<p>"+line+"</p>")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user