}
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
}
}
}
- return s, nil
+
}
// Renders markdown with the given layout into html expanding all the macros
title: Hello, world!
---
Some content in markdown
-`: Vars{
+`: {
"foo": "bar",
"title": "Hello, world!",
"url": "test.html",
url: "example.com/foo.html"
---
Hello
-`: Vars{
+`: {
"url": "example.com/foo.html",
"__content": "Hello\n",
},