mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
markup/goldmark: Unify some code block tests
This commit is contained in:
@@ -14,7 +14,6 @@
|
|||||||
package codeblocks_test
|
package codeblocks_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gohugoio/hugo/hugolib"
|
"github.com/gohugoio/hugo/hugolib"
|
||||||
@@ -54,25 +53,25 @@ title: "p1"
|
|||||||
|
|
||||||
## Ascii Diagram
|
## Ascii Diagram
|
||||||
|
|
||||||
CODE_FENCEgoat { width="600" }
|
§§§goat { width="600" }
|
||||||
--->
|
--->
|
||||||
CODE_FENCE
|
§§§
|
||||||
|
|
||||||
## Go Code
|
## Go Code
|
||||||
|
|
||||||
CODE_FENCEgo
|
§§§go
|
||||||
fmt.Println("Hello, World!");
|
fmt.Println("Hello, World!");
|
||||||
CODE_FENCE
|
§§§
|
||||||
|
|
||||||
## Golang Code
|
## Golang Code
|
||||||
|
|
||||||
CODE_FENCEgolang
|
§§§golang
|
||||||
fmt.Println("Hello, Golang!");
|
fmt.Println("Hello, Golang!");
|
||||||
CODE_FENCE
|
§§§
|
||||||
|
|
||||||
## Bash Code
|
## Bash Code
|
||||||
|
|
||||||
CODE_FENCEbash { linenos=inline,hl_lines=[2,"5-6"],linenostart=32 class=blue }
|
§§§bash { linenos=inline,hl_lines=[2,"5-6"],linenostart=32 class=blue }
|
||||||
echo "l1";
|
echo "l1";
|
||||||
echo "l2";
|
echo "l2";
|
||||||
echo "l3";
|
echo "l3";
|
||||||
@@ -81,11 +80,9 @@ echo "l5";
|
|||||||
echo "l6";
|
echo "l6";
|
||||||
echo "l7";
|
echo "l7";
|
||||||
echo "l8";
|
echo "l8";
|
||||||
CODE_FENCE
|
§§§
|
||||||
`
|
`
|
||||||
|
|
||||||
files = strings.ReplaceAll(files, "CODE_FENCE", "```")
|
|
||||||
|
|
||||||
b := hugolib.NewIntegrationTestBuilder(
|
b := hugolib.NewIntegrationTestBuilder(
|
||||||
hugolib.IntegrationTestConfig{
|
hugolib.IntegrationTestConfig{
|
||||||
T: t,
|
T: t,
|
||||||
|
@@ -250,9 +250,6 @@ LINE8
|
|||||||
|
|
||||||
`
|
`
|
||||||
|
|
||||||
// Code fences
|
|
||||||
files = strings.ReplaceAll(files, "§§§", "```")
|
|
||||||
|
|
||||||
b := hugolib.NewIntegrationTestBuilder(
|
b := hugolib.NewIntegrationTestBuilder(
|
||||||
hugolib.IntegrationTestConfig{
|
hugolib.IntegrationTestConfig{
|
||||||
T: t,
|
T: t,
|
||||||
|
Reference in New Issue
Block a user