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

Add an experimental Config struct. #87

Merged
merged 3 commits into from
Oct 29, 2023
Merged

Conversation

jugglerchris
Copy link
Owner

This aims to become a more general way of adding configuration for the translation.

This aims to become a more general way of adding configuration for the
translation.
impl<D: TextDecorator> Config<D> {
/// Reads HTML from `input`, and returns a `String` with text wrapped to
/// `width` columns.
pub fn string_from_read<R: std::io::Read>(self, input: R, width: usize) -> String {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods are destructive (they can only be used once), which I guess is probably ok. Otherwise either the decorators would need to be Clone, or it would have to take a "Decorator maker" instead.

@jugglerchris jugglerchris marked this pull request as ready for review October 29, 2023 20:49
@jugglerchris jugglerchris merged commit 0020fd7 into main Oct 29, 2023
1 check passed
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