Add namespaces and include tag, improve whitespace handling
This commit is contained in:
@@ -56,15 +56,14 @@ func main() {
|
||||
"page": Page{Title: "Users"},
|
||||
}
|
||||
|
||||
t, err := salix.New().
|
||||
WithVarMap(vars).
|
||||
WithEscapeHTML(true).
|
||||
ParseString("readme.salix.html", tmpl)
|
||||
t, err := salix.New().ParseString("readme.salix.html", tmpl)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
err = t.Execute(os.Stdout)
|
||||
err = t.WithVarMap(vars).
|
||||
WithEscapeHTML(true).
|
||||
Execute(os.Stdout)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
@@ -23,13 +23,12 @@ func main() {
|
||||
}
|
||||
|
||||
t, err := salix.New().
|
||||
WithVarMap(vars).
|
||||
ParseString("replybot.salix.txt", tmpl)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
err = t.Execute(os.Stdout)
|
||||
err = t.WithVarMap(vars).Execute(os.Stdout)
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#if(len(matches) > 1):Imgur links were#else:An Imgur link was#!if detected in your #(type). Here are links to the same #if(len(matches) > 1):locations#else:location#!if on alternative frontends that protect your privacy.
|
||||
|
||||
#for(i, match in matches):
|
||||
#if(len(matches) > 1):Link #(i+1):#!if
|
||||
- [imgur.artemislena.eu](https://imgur.artemislena.eu/#(match[1]))
|
||||
|
||||
Reference in New Issue
Block a user