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

[feature] Automatically remove empty comments from the model #699

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

woshilapin
Copy link
Contributor

The Model can be cleaned up of comments without any text.

ref: ND-1003.

datanel
datanel previously approved these changes Sep 9, 2020
@woshilapin
Copy link
Contributor Author

woshilapin commented Sep 9, 2020

I realized I forgot to bump the version of transit_model. Done in 9d6de1f.

@woshilapin woshilapin merged commit 118963f into hove-io:master Sep 9, 2020
@woshilapin woshilapin deleted the clean_comments branch September 9, 2020 15:08
@@ -1172,6 +1212,7 @@ impl Model {
/// ```
pub fn new(mut c: Collections) -> Result<Self> {
c.comment_deduplication();
c.clean_comments();
Copy link
Contributor

@pbougue pbougue Sep 10, 2020

Choose a reason for hiding this comment

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

As discussed: Current "comment_deduplication" would handle multiple things, but for performances it's probably way better to "clean_comment" inside comment_deduplication (and rename?).
If so, to be future-proof, please keep in mind that the key for comment comparison might change (and contain more than just comment.name in the future) 😉

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.

4 participants