pulldown-cmark-to-flowed

Library to create format=flowed plain text from markdown parsed by
pulldown-cmark.
format=flowed is a small extension to plain text that allows for line wrapping to
happen on the client side depending on the screen width of the client. Its main
purpose is for Text E-Mail to provide an improved experience without going through
HTML. At least Thunderbird supports this natively.
Example
use Parser;
let md = "Your markdown goes here";
// only the options (and any subset thereof) returned by this function are supported
let opts = parser_options;
let parser = new_ext;
let mut txt = Stringnew;
push_text;
If your markdown input looked like this:
Here is an example mail to demonstrate `format=flowed` text produced by
[`pulldown-cmark-to-flowed`]. The format has two main advantages:
1.
2.
Then your output looks like this:
Example Mail
============
Here is an example mail to demonstrate format=flowed text produced
by pulldown-cmark-to-flowed [1]. The format has two main
advantages:
1. It allows your client to match text to the screen width
2. When quoting text in your response, you avoid the awkward
newlines that get introduced when adding the > to the front of the
line, but keeping the line length under the 78 characters
recommended in the mail spec.
> Hey, quick question: Could you send me an example mail with
> format=flowed?
--
[1]: https://codeberg.org/proto-x/pulldown-cmark-to-flowed
Work in Progress
This library does not yet support all features of pulldown-cmark, and there are
some things that could certainly be made configurable (such as the preferred line
width). If you need a feature implemented or think that something could be done
better, please do open an issue.