diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2019-11-28 02:20:58 +0100 |
---|---|---|
committer | Christian Muehlhaeuser <muesli@gmail.com> | 2019-11-28 02:23:29 +0100 |
commit | d6c1b7fa732614397b7f7d7cd69626d7adcb46e0 (patch) | |
tree | 6b6bbd946083d7fc9b518925115f86e09b6406fd /main.go | |
parent | 5fe7e9448364798e91a02906c3876dcf84b07b52 (diff) |
Render each paragraph individually and reflow text only inside paragraphs
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -11,7 +11,6 @@ import ( "path/filepath" "github.com/mattn/go-isatty" - "github.com/muesli/go-wordwrap" "github.com/rakyll/statik/fs" "github.com/spf13/cobra" @@ -138,6 +137,7 @@ func execute(cmd *cobra.Command, args []string) error { return err } } + r.WordWrap = int(width) u, err := url.ParseRequestURI(src.URL) if err == nil { @@ -146,7 +146,7 @@ func execute(cmd *cobra.Command, args []string) error { } out := r.RenderBytes(b) - fmt.Printf("%s", wordwrap.WrapString(string(out), width)) + fmt.Printf("%s", string(out)) return nil } |