Use chroma v2 import

Signed-off-by: Odyssey <hi@odyssey346.dev>
This commit is contained in:
Odyssey
2023-02-07 16:47:01 +01:00
parent 652ccd0952
commit ad0c084876
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -6,9 +6,9 @@ import (
"context"
"html/template"
"github.com/alecthomas/chroma/lexers"
"github.com/alecthomas/chroma/styles"
htmlfmt "github.com/alecthomas/chroma/v2/formatters/html"
"github.com/alecthomas/chroma/v2/lexers"
"github.com/alecthomas/chroma/v2/styles"
"github.com/carlmjohnson/requests"
"github.com/gofiber/fiber/v2"
)
+1 -1
View File
@@ -22,7 +22,7 @@ func Serve() {
engine := html.New("./views", ".html")
engine.AddFunc(
// add unescape function
// Add unescape function. This is needed to render HTML from Markdown.
"unescape", func(s string) template.HTML {
return template.HTML(s)
},