fixed pongo module version
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
2022-02-28 11:43:47 +01:00
parent fc4eb98b69
commit 0683e327c9
76 changed files with 38 additions and 7123 deletions

View File

@@ -8,7 +8,7 @@ import (
"gitbase.de/apairon/mark2web/pkg/logger"
"gitbase.de/apairon/mark2web/pkg/mark2web"
"github.com/ddliu/motto"
"github.com/flosch/pongo2"
"github.com/flosch/pongo2/v4"
_ "github.com/robertkrimen/otto/underscore"
)

View File

@@ -2,7 +2,7 @@ package filter
import (
"github.com/davecgh/go-spew/spew"
"github.com/flosch/pongo2"
"github.com/flosch/pongo2/v4"
)
// DumpFilter is a pongo2 filter, which returns a spew.Dump of the input

View File

@@ -5,7 +5,7 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/flosch/pongo2"
"github.com/flosch/pongo2/v4"
. "github.com/smartystreets/goconvey/convey"
)

View File

@@ -20,7 +20,7 @@ import (
"gitbase.de/apairon/mark2web/pkg/mark2web"
"gitbase.de/apairon/mark2web/pkg/webrequest"
"github.com/disintegration/imaging"
"github.com/flosch/pongo2"
"github.com/flosch/pongo2/v4"
)
func parseImageParams(str string) (*mark2web.ImagingConfig, error) {
@@ -211,9 +211,9 @@ func ImageProcessFilter(in *pongo2.Value, param *pongo2.Value) (*pongo2.Value, *
}
} else {
out, err := os.Create(imgTarget)
logger.Eexit(err, "filter:image_resize, could not create image file '%s'", imgTarget)
defer out.Close()
logger.Eexit(err, "filter:image_resize, could not create image file '%s'", imgTarget)
switch p.Format {
case "jpeg", "jpg":
var jpegOpt *jpeg.Options

View File

@@ -7,7 +7,7 @@ import (
"gitbase.de/apairon/mark2web/pkg/jobm"
"gitbase.de/apairon/mark2web/pkg/mark2web"
"github.com/flosch/pongo2"
"github.com/flosch/pongo2/v4"
. "github.com/smartystreets/goconvey/convey"
)

View File

@@ -1,18 +1,18 @@
package filter
import (
"github.com/flosch/pongo2"
_ "github.com/flosch/pongo2-addons"
"github.com/flosch/pongo2/v4"
)
func init() {
err := pongo2.ReplaceFilter("markdown", MarkdownFilter)
// if err != nil {
// err = pongo2.RegisterFilter("markdown", MarkdownFilter)
if err != nil {
err = pongo2.RegisterFilter("markdown", MarkdownFilter)
if err != nil {
panic(err)
}
panic(err)
}
// }
newFilters := map[string]pongo2.FilterFunction{
"image_process": ImageProcessFilter,

View File

@@ -4,7 +4,7 @@ import (
"encoding/json"
"strings"
"github.com/flosch/pongo2"
"github.com/flosch/pongo2/v4"
)
// JSONFilter is a pongo2 filter, which returns a json string of the input

View File

@@ -4,7 +4,7 @@ import (
"math"
"testing"
"github.com/flosch/pongo2"
"github.com/flosch/pongo2/v4"
. "github.com/smartystreets/goconvey/convey"
)

View File

@@ -5,7 +5,7 @@ import (
"strings"
"gitbase.de/apairon/mark2web/pkg/helper"
"github.com/flosch/pongo2"
"github.com/flosch/pongo2/v4"
)
// MarkdownFilter is a pongo2 filter, which converts markdown to html

View File

@@ -3,7 +3,7 @@ package filter
import (
"testing"
"github.com/flosch/pongo2"
"github.com/flosch/pongo2/v4"
. "github.com/smartystreets/goconvey/convey"
)

View File

@@ -2,7 +2,7 @@ package filter
import (
"gitbase.de/apairon/mark2web/pkg/mark2web"
"github.com/flosch/pongo2"
"github.com/flosch/pongo2/v4"
)
// RelativePathFilter returns the relative path to navpoint based on current nav

View File

@@ -5,7 +5,7 @@ import (
"gitbase.de/apairon/mark2web/pkg/mark2web"
"github.com/flosch/pongo2"
"github.com/flosch/pongo2/v4"
. "github.com/smartystreets/goconvey/convey"
)