aboutsummaryrefslogtreecommitdiffhomepage
path: root/markup/asciidocext
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-12-02 13:23:25 +0100
committerBjørn Erik Pedersen <[email protected]>2020-12-03 13:12:58 +0100
commitd90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch)
tree7b1b14464eefec1188ca2eed53c64e4823453cc9 /markup/asciidocext
parent32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff)
downloadhugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.tar.gz
hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.zip
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'markup/asciidocext')
-rw-r--r--markup/asciidocext/convert.go3
-rw-r--r--markup/asciidocext/convert_test.go1
2 files changed, 1 insertions, 3 deletions
diff --git a/markup/asciidocext/convert.go b/markup/asciidocext/convert.go
index a92b6f9e3..e2e5b7865 100644
--- a/markup/asciidocext/convert.go
+++ b/markup/asciidocext/convert.go
@@ -96,7 +96,7 @@ func (a *asciidocConverter) getAsciidocContent(src []byte, ctx converter.Documen
}
func (a *asciidocConverter) parseArgs(ctx converter.DocumentContext) []string {
- var cfg = a.cfg.MarkupConfig.AsciidocExt
+ cfg := a.cfg.MarkupConfig.AsciidocExt
args := []string{}
args = a.appendArg(args, "-b", cfg.Backend, asciidocext_config.CliDefault.Backend, asciidocext_config.AllowedBackend)
@@ -137,7 +137,6 @@ func (a *asciidocConverter) parseArgs(ctx converter.DocumentContext) []string {
file := filepath.Base(ctx.Filename)
if a.cfg.Cfg.GetBool("uglyUrls") || file == "_index.adoc" || file == "index.adoc" {
outDir, err = filepath.Abs(filepath.Dir(filepath.Join(destinationDir, ctx.DocumentName)))
-
} else {
postDir := ""
page, ok := ctx.Document.(pageSubset)
diff --git a/markup/asciidocext/convert_test.go b/markup/asciidocext/convert_test.go
index 0e7c93c45..fa3aef404 100644
--- a/markup/asciidocext/convert_test.go
+++ b/markup/asciidocext/convert_test.go
@@ -246,7 +246,6 @@ func TestAsciidoctorAttributes(t *testing.T) {
c.Assert(args[2], qt.Equals, "-a")
c.Assert(expectedValues[args[3]], qt.Equals, true)
c.Assert(args[4], qt.Equals, "--no-header-footer")
-
}
func TestConvert(t *testing.T) {