summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-11-28 02:20:58 +0100
committerChristian Muehlhaeuser <muesli@gmail.com>2019-11-28 02:23:29 +0100
commitd6c1b7fa732614397b7f7d7cd69626d7adcb46e0 (patch)
tree6b6bbd946083d7fc9b518925115f86e09b6406fd /main.go
parent5fe7e9448364798e91a02906c3876dcf84b07b52 (diff)
Render each paragraph individually and reflow text only inside paragraphs
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index c282da7..17de092 100644
--- a/main.go
+++ b/main.go
@@ -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
}