mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-09 03:11:44 +00:00
Apply project wide go fmt
This commit is contained in:
parent
c274e21356
commit
72f14a8202
8 changed files with 28 additions and 29 deletions
|
@ -4,9 +4,9 @@ import (
|
|||
"bytes"
|
||||
"html"
|
||||
|
||||
"github.com/miekg/mmark"
|
||||
"github.com/russross/blackfriday"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/miekg/mmark"
|
||||
)
|
||||
|
||||
// Wraps a blackfriday.Renderer, typically a blackfriday.Html
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
package helpers
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"github.com/spf13/viper"
|
||||
"bytes"
|
||||
"github.com/spf13/viper"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Renders a codeblock using Blackfriday
|
||||
func render(input string) string {
|
||||
ctx := &RenderingContext{};
|
||||
render := GetHTMLRenderer(0, ctx);
|
||||
ctx := &RenderingContext{}
|
||||
render := GetHTMLRenderer(0, ctx)
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
render.BlockCode(buf, []byte(input), "html")
|
||||
|
@ -17,15 +18,14 @@ func render(input string) string {
|
|||
|
||||
// Renders a codeblock using Mmark
|
||||
func renderWithMmark(input string) string {
|
||||
ctx := &RenderingContext{};
|
||||
render := GetMmarkHtmlRenderer(0, ctx);
|
||||
ctx := &RenderingContext{}
|
||||
render := GetMmarkHtmlRenderer(0, ctx)
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
render.BlockCode(buf, []byte(input), "html", []byte(""), false, false)
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
|
||||
func TestCodeFence(t *testing.T) {
|
||||
|
||||
if !HasPygments() {
|
||||
|
|
|
@ -347,7 +347,6 @@ func TestDictionary(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func TestIn(t *testing.T) {
|
||||
for i, this := range []struct {
|
||||
v1 interface{}
|
||||
|
|
Loading…
Add table
Reference in a new issue