wooorm / markdown-rs

CommonMark compliant markdown parser in Rust with ASTs and extensions
https://docs.rs/markdown/1.0.0-alpha.18/markdown/
MIT License
836 stars 41 forks source link

Implement file_to_html #75

Closed szabgab closed 11 months ago

szabgab commented 11 months ago

The old crate with the same name had this convenience function that would read the content of a file and then call to_html on it. It would be nice to add it to the new crate as well.

wooorm commented 11 months ago

Hi! I understand the desire but personally I’m a fan of “unix philosophy” “do one thing and do it well” kinda open source. Reading files gets complex. Other tools are better at doing that. This thing is about markdown -> html or ast, not about all the intricacies of file systems and such! It’s also [no_std] + alloc, so fs might not be there?

szabgab commented 11 months ago

After opening this issue I tried to implement it and then I noticed the [no_std] that makes it rather hard :-) I understand your point. I think it is still useful to have such convenience functions. So I am thinking of creating a crate that provides those functions and uses this crate as its 'back-end'. Would you have any suggestions for the name of such crate?

wooorm commented 11 months ago

markdown-fs? 😅