From bc268db233192a18b9dbf4f2478aa128487d181b Mon Sep 17 00:00:00 2001 From: Seednode Date: Thu, 14 Sep 2023 21:09:19 -0500 Subject: [PATCH] Remove svg from image handler, remove line numbers from code handler --- cmd/root.go | 2 +- types/code/code.go | 6 ------ types/images/images.go | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 949ca08..d3d0205 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -11,7 +11,7 @@ import ( ) const ( - ReleaseVersion string = "0.84.2" + ReleaseVersion string = "0.84.3" ) var ( diff --git a/types/code/code.go b/types/code/code.go index d9ddbe8..7872011 100644 --- a/types/code/code.go +++ b/types/code/code.go @@ -25,11 +25,8 @@ func (t Format) Css() string { var css strings.Builder formatter := html.New( - html.LineNumbersInTable(true), html.TabWidth(4), html.WithClasses(true), - html.WithLineNumbers(true), - html.WithLinkableLineNumbers(true, ""), html.WrapLongLines(true)) style := styles.Get("solarized-dark256") @@ -92,11 +89,8 @@ func (t Format) Body(rootUrl, fileUri, filePath, fileName, prefix, mime string) } formatter := html.New( - html.LineNumbersInTable(true), html.TabWidth(4), html.WithClasses(true), - html.WithLineNumbers(true), - html.WithLinkableLineNumbers(true, ""), html.WrapLongLines(true)) iterator, err := lexer.Tokenise(nil, contentString) diff --git a/types/images/images.go b/types/images/images.go index 7d1866b..e1bdf75 100644 --- a/types/images/images.go +++ b/types/images/images.go @@ -76,7 +76,6 @@ func (t Format) Extensions() map[string]string { `.pjp`: `image/jpeg`, `.pjpeg`: `image/jpeg`, `.png`: `image/png`, - `.svg`: `image/svg+xml`, `.webp`: `image/webp`, } }