skubalj / build_html

Library for basic server-side rendering written in pure rust https://crates.io/crates/build_html
MIT License
29 stars 5 forks source link

Feat: Ability to change the doctype header and html tag to #4

Closed xorapps closed 1 year ago

xorapps commented 1 year ago

This pull request allows the changing of the doctype tag to something else like XHTML 1.0 which is can be use for compatibility with legacy email clients.

The tag can also have attributes for legacy compatibility

skubalj commented 1 year ago

Thanks so much for wanting to help improve build_html and for opening a PR! I honestly never thought there was much utility in including HTML types beyond HTML5, so it's really cool to see what people want to do with the library.

I think if we're going to add support for different HTML versions, I'd like to do it in a more flexible way, making it easier for others to patch in new versions in the future. I've thrown together an implementation in this PR: #5. Does this meet your needs?