From: Izuru Yakumo Date: Mon, 4 Dec 2023 17:21:08 +0000 (-0300) Subject: Passed through golint only to get a load of garbage X-Git-Tag: v0.6.8 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=878d02f920596776bf06396e97ad7df7113e86b9;p=aya.git Passed through golint only to get a load of garbage Signed-off-by: Izuru Yakumo --- diff --git a/LICENSE b/LICENSE index 04b041b..5b307bf 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ The MIT License (MIT) -Copyright (c) 2014 zserge -Copyright (c) 2023 Izuru Yakumo +Copyright (c) 2014 Serge Zaitsev +Copyright (c) 2023 Izuru Yakumo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -20,4 +20,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/cmd/aya/main.go b/cmd/aya/main.go index c446482..6490370 100644 --- a/cmd/aya/main.go +++ b/cmd/aya/main.go @@ -1,4 +1,4 @@ -// $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v0.6.7 2023-12-04 01:55:36+0000, yakumo_izuru Exp $ +// $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v0.6.8 2023-12-04 15:43:44+0000, yakumo_izuru Exp $ package main import ( @@ -141,21 +141,21 @@ func getVars(path string, globals Vars) (Vars, string, error) { // Render expanding aya plugins and variables func render(s string, vars Vars) (string, error) { - delim_open := "{{" - delim_close := "}}" + delimOpen := "{{" + delimClose := "}}" out := &bytes.Buffer{} for { - if from := strings.Index(s, delim_open); from == -1 { + if from := strings.Index(s, delimOpen); from == -1 { out.WriteString(s) return out.String(), nil } else { - if to := strings.Index(s, delim_close); to == -1 { - return "", fmt.Errorf("Close delim not found") + if to := strings.Index(s, delimClose); to == -1 { + return "", fmt.Errorf("Closing delimiter not found") } else { out.WriteString(s[:from]) - cmd := s[from+len(delim_open) : to] - s = s[to+len(delim_close):] + cmd := s[from+len(delimOpen) : to] + s = s[to+len(delimClose):] m := strings.Fields(cmd) if len(m) == 1 { if v, ok := vars[m[0]]; ok { @@ -308,7 +308,7 @@ func build(path string, w io.Writer, vars Vars) error { ext := filepath.Ext(path) if ext == ".md" || ext == ".mkd" || ext == ".markdown" { return buildMarkdown(path, w, vars) - } else if ext == ".html" || ext == ".xml" { + } else if ext == ".htm" || ext == ".html" || ext == ".xht" || ext == ".xhtml" { return buildHTML(path, w, vars) } else if ext == ".amber" { return buildAmber(path, w, vars) diff --git a/doc.go b/doc.go index f4c5df3..f895c0e 100644 --- a/doc.go +++ b/doc.go @@ -16,8 +16,8 @@ // This is a hard fork of git.mills.io/prologic/zs, which in turn is a fork of zserge's zs // This one (re)incorporates the features removed in the former from the latter -// Copyright (c) 2014 Serge Zaitsev -// Copyright (c) 2023 Izuru Yakumo +// Copyright (c) 2014 Serge Zaitsev +// Copyright (c) 2023 Izuru Yakumo // Ayaya~ package aya diff --git a/version.go b/version.go index 46e51c5..467257e 100644 --- a/version.go +++ b/version.go @@ -8,7 +8,7 @@ import ( var ( // Set to current tag - Version = "v0.6.7" + Version = "v0.6.8" Time = time.Now() )