# HG changeset patch # User prologic # Date 1635437415 0 # Node ID befb74a09424c3c053b7aea20258819f9387bc46 # Parent e054275d09380b97d19a7fc645bc3764a67b3d9e Code cleanup diff -r e054275d0938 -r befb74a09424 .gitignore --- a/.gitignore Sat Oct 23 03:57:19 2021 +0000 +++ b/.gitignore Thu Oct 28 16:10:15 2021 +0000 @@ -1,6 +1,7 @@ *~ *.bak +**.pub /zs -/.pub /dist +/test.md diff -r e054275d0938 -r befb74a09424 main.go --- a/main.go Sat Oct 23 03:57:19 2021 +0000 +++ b/main.go Thu Oct 28 16:10:15 2021 +0000 @@ -33,9 +33,8 @@ } if oldext == "" || strings.HasSuffix(path, oldext) { return strings.TrimSuffix(path, oldext) + newext - } else { - return path } + return path } // globals returns list of global OS environment variables that start @@ -169,7 +168,7 @@ } } } - return s, nil + } // Renders markdown with the given layout into html expanding all the macros diff -r e054275d0938 -r befb74a09424 main_test.go --- a/main_test.go Sat Oct 23 03:57:19 2021 +0000 +++ b/main_test.go Thu Oct 28 16:10:15 2021 +0000 @@ -55,7 +55,7 @@ title: Hello, world! --- Some content in markdown -`: Vars{ +`: { "foo": "bar", "title": "Hello, world!", "url": "test.html", @@ -67,7 +67,7 @@ url: "example.com/foo.html" --- Hello -`: Vars{ +`: { "url": "example.com/foo.html", "__content": "Hello\n", },