Use chroma v2 import

Signed-off-by: Odyssey <hi@odyssey346.dev>
このコミットが含まれているのは:
Odyssey 2023-02-07 16:47:01 +01:00
コミット ad0c084876
2個のファイルの変更3行の追加3行の削除

ファイルの表示

@ -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"
)

ファイルの表示

@ -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)
},