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

Use default style if user-defined style is missing. #210

Conversation

0ndorio
Copy link
Contributor

@0ndorio 0ndorio commented Oct 11, 2021

Changes the serde configuration of the RawConfig struct to utilize a custom Default implementation to initialize new objects.

This implementation contains the default style set as it was previously provided through the implementation of RawConfig::new(), and therefore, allows to utilize the default configuration until the user overwrites the related RawStyleConfig field, e.g. the description highlighting.

.. fixes #149

Changes the serde configuration of the `RawConfig` struct to utilize
a custom `Default` implementation to initialize new objects. This
implementation contains the default style set as it was previously
provided through the implementation of `RawConfig::new()`.

This allows to utilize the default configuration until the user
overwrites the related `RawStyleConfig` field, e.g. the description
highlighting.

.. fixes tealdeer-rs#149
@dbrgn dbrgn added the ready-for-review The PR can be reviewed and is waiting for the maintainers. label Oct 16, 2021
Copy link
Collaborator

@dbrgn dbrgn left a comment

Choose a reason for hiding this comment

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

Seems to work fine, thank you!

@dbrgn dbrgn merged commit 32cc6d5 into tealdeer-rs:master Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review The PR can be reviewed and is waiting for the maintainers.
Development

Successfully merging this pull request may close these issues.

Use default style if no user-defined style specified
2 participants