repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
f7a1506
parent
62f92a3
author
Eric Bower
date
2022-11-02 16:09:59 +0000 UTC
fix: correctly cast bool frontmatter
1 files changed,  +4, -1
M shared/mdparser.go
+4, -1
 1@@ -58,7 +58,10 @@ func toString(obj interface{}) string {
 2 }
 3 
 4 func toBool(obj interface{}) bool {
 5-	return strings.EqualFold(toString(obj), "true")
 6+	if obj == nil {
 7+		return false
 8+	}
 9+	return obj.(bool)
10 }
11 
12 func toLinks(obj interface{}) ([]Link, error) {