Skip to content

Option to prevent wrapping of lines inside of code blocks. #98

@charles-plessy

Description

@charles-plessy

Hello,

I am exploring the possible use of rich-cli as a markdown → text renderer for text-based email readers like mutt, in which I want to limit the width of the area where the text is being displayed.

If I have an input like:

sfda sdfdsa
sfda sdfdsa sfda sdfa sfd sadfsadfsad asdfafdsf asfasdfsadf asdfsdfasd asdfasdasdfa asdfasdfasdf asdfasdfsaf asfdsdfafds

```
sfda sdfdsa
sfda sdfdsa sfda sdfa sfd sadfsadfsad asdfafdsf asfasdfsadf asdfsdfasd asdfasdasdfa asdfasdfasdf asdfasdfsaf asfdsdfafds
```

Then rich-cli -w 80 converts it to:

sfda sdfdsa sfda sdfdsa sfda sdfa sfd sadfsadfsad asdfafdsf asfasdfsadf
asdfsdfasd asdfasdasdfa asdfasdfasdf asdfasdfsaf asfdsdfafds                    

sfda sdfdsa                                                                 
sfda sdfdsa sfda sdfa sfd sadfsadfsad asdfafdsf asfasdfsadf asdfsdfasd      
asdfasdasdfa asdfasdfasdf asdfasdfsaf asfdsdfafds

However I am searching for a way that in the code block (which could be a diff with long lines, for example), lines are never wrapped (like what GitHub does)…

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions