summaryrefslogtreecommitdiff
path: root/crocc.go
diff options
context:
space:
mode:
Diffstat (limited to 'crocc.go')
-rw-r--r--crocc.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/crocc.go b/crocc.go
index 74b14f5..e88ab33 100644
--- a/crocc.go
+++ b/crocc.go
@@ -136,7 +136,8 @@ func Crocc(path string, d os.DirEntry, e error) error {
// If the file is a Markdown file, transform it into HTML
o = strings.TrimSuffix(o, filepath.Ext(o)) + ".html"
- if err := TransformMarkdownFile(path, o); err != nil {
+ s := strings.TrimSuffix(strings.TrimPrefix(o, *out), ".html")
+ if err := TransformMarkdownFile(path, o, s); err != nil {
return err
}