Added indent type, indent size and wrap mode to editors

This commit is contained in:
Thomas Miceli
2023-04-03 00:40:39 +02:00
parent f9f5b140b8
commit 2aee52e06c
7 changed files with 179 additions and 38 deletions

View File

@ -16,6 +16,7 @@ import (
"opengist/internal/config"
"opengist/internal/git"
"opengist/internal/models"
"os"
"path/filepath"
"regexp"
"strconv"
@ -23,6 +24,7 @@ import (
"time"
)
var devAssets = os.Getenv("DEV_ASSETS") == "1"
var store *sessions.CookieStore
var re = regexp.MustCompile("[^a-z0-9]+")
var fm = template.FuncMap{
@ -75,6 +77,9 @@ var fm = template.FuncMap{
return fmt.Sprintf("%x", md5.Sum([]byte(strings.ToLower(strings.TrimSpace(email)))))
},
"asset": func(jsfile string) string {
if devAssets {
return "http://localhost:16157/" + jsfile
}
return "/" + manifestEntries[jsfile].File
},
}