From 1983f1d4ef0ae0c504e11a7fad486a1cbdc59e26 Mon Sep 17 00:00:00 2001 From: gelosie Date: Fri, 21 Sep 2012 20:40:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E7=9A=84html=E6=96=87?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=9B=BF=E6=8D=A2.md=EF=BC=8C=E8=80=8C?= =?UTF-8?q?=E4=B8=8D=E6=98=AF=E5=9C=A8=E5=90=8E=E9=9D=A2=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.go b/build.go index d7bfdedf..59ff9b18 100644 --- a/build.go +++ b/build.go @@ -30,7 +30,7 @@ func (self *Visitor) visit(path string, f os.FileInfo, err error) error { input, _ := ioutil.ReadAll(file) output := blackfriday.MarkdownCommon(input) var out *os.File - if out, err = os.Create(f.Name() + ".html"); err != nil { + if out, err = os.Create(strings.Replace(f.Name(),".md",".html",-1) ); err != nil { fmt.Fprintf(os.Stderr, "Error creating %s: %v", f.Name(), err) os.Exit(-1) }