Changeset 77 in code
- Timestamp:
- Dec 4, 2023, 5:21:08 PM (18 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LICENSE
r56 r77 1 1 The MIT License (MIT) 2 2 3 Copyright (c) 2014 zserge4 Copyright (c) 2023 Izuru Yakumo 3 Copyright (c) 2014 Serge Zaitsev <hello@zserge.com> 4 Copyright (c) 2023 Izuru Yakumo <yakumo.izuru@chaotic.ninja> 5 5 6 6 Permission is hereby granted, free of charge, to any person obtaining a copy … … 21 21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 22 SOFTWARE. 23 -
trunk/cmd/aya/main.go
r76 r77 1 // $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v0.6. 7 2023-12-04 01:55:36+0000, yakumo_izuru Exp $1 // $TheSupernovaDuo: marisa.chaotic.ninja/aya/cmd/aya, v0.6.8 2023-12-04 15:43:44+0000, yakumo_izuru Exp $ 2 2 package main 3 3 … … 142 142 // Render expanding aya plugins and variables 143 143 func render(s string, vars Vars) (string, error) { 144 delim _open := "{{"145 delim _close := "}}"144 delimOpen := "{{" 145 delimClose := "}}" 146 146 147 147 out := &bytes.Buffer{} 148 148 for { 149 if from := strings.Index(s, delim _open); from == -1 {149 if from := strings.Index(s, delimOpen); from == -1 { 150 150 out.WriteString(s) 151 151 return out.String(), nil 152 152 } else { 153 if to := strings.Index(s, delim _close); to == -1 {154 return "", fmt.Errorf("Clos e delimnot found")153 if to := strings.Index(s, delimClose); to == -1 { 154 return "", fmt.Errorf("Closing delimiter not found") 155 155 } else { 156 156 out.WriteString(s[:from]) 157 cmd := s[from+len(delim _open) : to]158 s = s[to+len(delim _close):]157 cmd := s[from+len(delimOpen) : to] 158 s = s[to+len(delimClose):] 159 159 m := strings.Fields(cmd) 160 160 if len(m) == 1 { … … 309 309 if ext == ".md" || ext == ".mkd" || ext == ".markdown" { 310 310 return buildMarkdown(path, w, vars) 311 } else if ext == ".htm l" || ext == ".xml" {311 } else if ext == ".htm" || ext == ".html" || ext == ".xht" || ext == ".xhtml" { 312 312 return buildHTML(path, w, vars) 313 313 } else if ext == ".amber" { -
trunk/doc.go
r72 r77 17 17 // This one (re)incorporates the features removed in the former from the latter 18 18 19 // Copyright (c) 2014 Serge Zaitsev 20 // Copyright (c) 2023 Izuru Yakumo 19 // Copyright (c) 2014 Serge Zaitsev <hello@zserge.com> 20 // Copyright (c) 2023 Izuru Yakumo <yakumo.izuru@chaotic.ninja> 21 21 22 22 // Ayaya~ -
trunk/version.go
r76 r77 9 9 var ( 10 10 // Set to current tag 11 Version = "v0.6. 7"11 Version = "v0.6.8" 12 12 Time = time.Now() 13 13 )
Note:
See TracChangeset
for help on using the changeset viewer.