mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-20 23:24:18 +02:00
Move Render and RenderBytes to TermRenderer
This commit is contained in:
parent
18f3a85900
commit
9adff17b70
1 changed files with 2 additions and 1 deletions
3
main.go
3
main.go
|
|
@ -82,10 +82,11 @@ func execute(cmd *cobra.Command, args []string) error {
|
|||
defer in.Close()
|
||||
|
||||
b, _ := ioutil.ReadAll(in)
|
||||
out, err := gold.RenderBytes(b, style)
|
||||
r, err := gold.NewTermRenderer(style)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
out := r.RenderBytes(b)
|
||||
fmt.Printf("%s", string(out))
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue