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

Wrapping quotations #121

Closed
matthiasbeyer opened this issue Jan 16, 2018 · 2 comments · Fixed by #294
Closed

Wrapping quotations #121

matthiasbeyer opened this issue Jan 16, 2018 · 2 comments · Fixed by #294

Comments

@matthiasbeyer
Copy link

matthiasbeyer commented Jan 16, 2018

Hi. Thanks for developing this, it is really useful!

I have an issue: When wrapping the following content:

> foo bar baz
> baz baz

for example, I end up with

> foo
bar
baz
> baz
baz

But I want the quotes to be fixed, of course:

> foo
> bar
> baz
> baz
> baz

Could you please add support for this? It is useful for wrapping Email quotations for example, but I think it could also be useful for wrapping markdown and other formats.

@mgeisler
Copy link
Owner

Hey Matthias,

Handling this kind of prefixes would indeed be cool! I would probably suggest taking a look at how Emacs handles this: the word wrapping in Emacs is quite clever and will adaptively handle things like (hanging) indentation, comments, and bullet lists.

mgeisler added a commit that referenced this issue Feb 20, 2021
These small helper functions makes it possible to take already wrapped
text and re-wrap it to a different width. Things like Markdown
unordered lists, quoted emails, and comment blocks can be rewrapped
with the refill function.

Fixes #60.
Fixes #121.
@mgeisler
Copy link
Owner

Fixed with the release of 0.13.3 and the new refill function. This function can rewrap text like the above (but only one paragraph at a time). Improvement PRs would be very welcome to make it even more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants