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

refactor to simply code using Mime struct and mime_guess crate #27

Merged
merged 5 commits into from
Aug 9, 2023

Conversation

ultrasaurus
Copy link
Owner

@ultrasaurus ultrasaurus commented Aug 3, 2023

refactor utils to use mime and mime_guess crates
refactor Document fn write_html to use mime_guess (plus a few tests!)

  • PathExt use mime_guess to return mime type from a path
  • Document::write_html
    • use mime_guess directly since CowStr url not a Path
    • match on structured mime type
  • delete unused utility functions

TODO:

  • manually core functionality with examples
    • nested-files
    • book-html
    • book-md

refactor utils to use mime and mime_guess crates
refactor Document fn write_html to use mime_guess (plus a few tests!)

- PathExt use mime_guess to return mime type from a path
- Document::write_html
  - use mime_guess directly since CowStr url not a Path
  - match on structured mime type
- delete unused utility functions
@ultrasaurus
Copy link
Owner Author

addresses #26

@ultrasaurus ultrasaurus requested a review from enw August 3, 2023 09:00
not comprehensive, just making testing that library is wired up correctly
if more bugs are found, likely tests needed in some dependent library
@ultrasaurus ultrasaurus merged commit adbe7b4 into main Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant