Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncate does not work for blocks of text #28

Open
erikgeiser opened this issue Nov 17, 2020 · 0 comments
Open

Truncate does not work for blocks of text #28

erikgeiser opened this issue Nov 17, 2020 · 0 comments

Comments

@erikgeiser
Copy link
Contributor

All the functions referenced in the README.md are advertised to work on blocks of text, but truncate does not:

package main

import (
	"fmt"

	"github.com/muesli/reflow/truncate"
)

func main() {
	test := "123456789\nhidden"
	fmt.Println(truncate.String(test, 5)) // output: 12345
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant