Simplify examples

This commit is contained in:
Christian Muehlhaeuser
2019-12-25 05:54:26 +01:00
parent 56af24c72d
commit 4d9e90bd78
3 changed files with 4 additions and 13 deletions
+2 -11
View File
@@ -23,7 +23,7 @@ Bye!
`
out, _ := glamour.Render(in, "dark")
fmt.Printf(out)
fmt.Print(out)
```
![HelloWorld Example](https://github.com/charmbracelet/glamour/raw/master/examples/helloworld/helloworld.png)
@@ -36,21 +36,12 @@ import (
"github.com/charmbracelet/glamour/ansi"
)
in := `# Custom Renderer
Word-wrapping will occur when lines exceed the limit of 40 characters. Just so
you know: Glamour's default word-wrapping limit is set to 100 characters per
line.
Bye!
`
r, _ := glamour.NewTermRenderer("dark", ansi.Options{
WordWrap: int(40),
})
out, _ := r.Render(in)
fmt.Printf("%s", out)
fmt.Print(out)
}
```
+1 -1
View File
@@ -22,5 +22,5 @@ Bye!
})
out, _ := r.Render(in)
fmt.Printf("%s", out)
fmt.Print(out)
}
+1 -1
View File
@@ -16,5 +16,5 @@ Bye!
`
out, _ := glamour.Render(in, "dark")
fmt.Printf(out)
fmt.Print(out)
}