Skip to content

Unexpected output from binary when input includes tabs #38

@JarredAllen

Description

@JarredAllen

Whenever the input contains a tab character, it breaks the formatting of the text bubble (at least with the binary, I haven't tried the library).

For example, this is what I observe if it gets \thello, world as input:

$ printf '\thello, world' | fsays
 ______________
<       hello, world >
 --------------
        \
         \
            _~^~^~_
        \) /  o o  \ (/
          '_   -   _'
          / '-----' \

I would expect the output to look more like this (with the text matching the bubble in size):

$ printf '\thello, world' | fsays
 __________________
<     hello, world >
 ------------------
        \
         \
            _~^~^~_
        \) /  o o  \ (/
          '_   -   _'
          / '-----' \

I hit this issue because in my .bashrc I have the command fortune | cowsay, and I tried replacing cowsay with this crate, but fortune puts an output with tabs, which causes the output of fortune | fsays to be misformatted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions