summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Sardana <himanshusardana2005@gmail.com>2026-03-16 18:48:30 +0000
committerHimanshu Sardana <himanshusardana2005@gmail.com>2026-03-16 18:48:30 +0000
commitaab7785817f35c1e1a85dfbff733480c550c4e3c (patch)
treea039cb2ae7c2901815ae6465321099f8357af51a
parent11a5a261a0d2c833a9bc12cb0c86e5b1e624b7b1 (diff)
fix: generated html file name
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index edb3850..d12fd01 100644
--- a/main.go
+++ b/main.go
@@ -21,7 +21,7 @@ func main() {
if !f.IsDir() && strings.HasSuffix(f.Name(), ".md") {
fmt.Printf("Found content: %s", f.Name())
htmlContent := convertToHtml(filePath)
- htmlPath := filePath + ".html"
+ htmlPath := strings.Replace(filePath, ".md", ".html", 1)
os.WriteFile(htmlPath, htmlContent, 0o777)
fmt.Printf("Wrote file: %s", htmlPath)
}