-
Notifications
You must be signed in to change notification settings - Fork 235
Open
Description
Describe the bug
Line wrapping does not work correctly when the text contains command-line options like --option-one, --option-two.
Setup
Please complete the following information along with version numbers, if applicable.
- OS: macOS
- Shell: zsh
- Terminal Emulator: iterm2
- Terminal Multiplexer: tmux
Source Code
package main
import (
"fmt"
"github.com/charmbracelet/glamour"
)
func main() {
s := "This is a line with some command-line options like --option-one and --option-two and --option-three and many many many many many many many many many many many many many many many many many many many many words."
out, _ := glamour.Render(s, "dark")
fmt.Print(out)
}
Expected behavior
Lines should wrap correctly at around 80 characters, which is the default width.
Actual output
There were some extra line breaks. See the output below.
This is a line with some command-line options like --option-one and --option-
two
and --option-three and many many many many many many many many many many
many
many many many many many many many many many words
pgalbavy-itrs
Metadata
Metadata
Assignees
Labels
No labels