Add text generation via text feature.#801
Conversation
|
Interesting, but I have to dig more into it before merging. What do you think about this feature, @raphlinus? Thanks! |
|
I will say it’s not particularly well implemented. It works for my use-case but it needs a decent review and probably more work. My use-case is for sending e-mail, which needs to be generated in both HTML and plain text and markdown is the ideal medium to use as the source of the e-mail content. |
|
Additional use cases:
I could make use of it right now if available. @trojanfoe , I added a few comments in the code, but I may be off the mark there. Happy to help with this lot of work if the maintainers think it's worth adding to the library. |
|
It could be useful, for sure. but we need a good implementation before merging. |
This PR provides basic plain-text generation via a new
textfeature, which is disabled by default.I added this as I needed to send e-mail content which is best sent as a multipart message containing both HTML and plain text and markdown seemed like the best format for this.
One issue with generating multiple strings from the same markdown input is that it's necessary to duplicate the parser as the iterator consumes the input: