mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 00:47:15 -04:00
Use a plain-text renderer when not printing to Terminal
This commit is contained in:
@@ -86,6 +86,10 @@ func RenderBytes(in []byte, stylePath string) ([]byte, error) {
|
||||
return r.RenderBytes(in), nil
|
||||
}
|
||||
|
||||
func NewPlainTermRenderer() *TermRenderer {
|
||||
return &TermRenderer{}
|
||||
}
|
||||
|
||||
func NewTermRenderer(stylePath string) (*TermRenderer, error) {
|
||||
if stylePath == "" {
|
||||
return NewTermRendererFromBytes([]byte("{}"))
|
||||
|
||||
Reference in New Issue
Block a user