2020-11-27 11:02:33 +00:00
|
|
|
package markdown
|
|
|
|
|
|
|
|
import "strings"
|
|
|
|
|
2020-11-27 17:39:05 +00:00
|
|
|
func Generate(bases []Node) string {
|
2020-11-27 11:02:33 +00:00
|
|
|
lines := make([]string, len(bases))
|
|
|
|
|
|
|
|
for i, base := range bases {
|
|
|
|
lines[i] = base.String()
|
|
|
|
}
|
|
|
|
|
2020-11-27 17:36:34 +00:00
|
|
|
return strings.Join(lines, string(NewlineToken)+string(NewlineToken))
|
2020-11-27 11:02:33 +00:00
|
|
|
}
|