-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
When text is truncated, uutils/ptx incorrectly adds a leading space before the truncation marker in both roff (-G) formats and tex formats, which is inconsistent with GNU ptx.
Steps to Reproduce
Run the following command with GNU ptx:
echo "Hello World\nRust is funnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" | ptx -G -w 30The output for the keyword "is" contains "is/".

but run the same command with uutils/ptx:
echo "Hello World\nRust is funnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" |cargo run -- -G -w 30The output for the keyword "is" contains "is /".

of course,multiple spaces between words also trigger this bug.