You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
emdbed/emdbed_example_test.go

29 lines
443 B

// Package emdbed is for embedding "things" in your markdown
package emdbed
import (
"fmt"
)
func Example() {
fi, err := testdata.Open("testdata/main.md")
defer fi.Close()
out, err := Convert("testdata", fi)
if err != nil {
panic(err)
}
fmt.Println(out)
// Output:
//<!-- emdbed: main.go -->
//```go
//package main
//
//import "fmt"
//
//func main() {
// fmt.Println("Hello, world!")
//}
//
// ```
//<!-- /emdbed -->
}