diff --git a/examples_test.go b/examples_test.go index 7809e53..33673ef 100644 --- a/examples_test.go +++ b/examples_test.go @@ -1,21 +1,19 @@ +//go:build windows +// +build windows + package markdown_test import ( "os" - "runtime" "github.com/go-spectest/markdown" ) +// Examle is example code. Skip this test on Windows. +// The newline codes in the comment section where +// the expected values are written are represented as '\n', +// causing failures when testing on Windows. func Example() { - // Skip this test on Windows. - // The newline codes in the comment section where - // the expected values are written are represented as '\n', - // causing failures when testing on Windows. - if runtime.GOOS == "windows" { - return - } - markdown.NewMarkdown(os.Stdout). H1("This is H1"). PlainText("This is plain text").