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 simple panic messages #201

Merged
merged 3 commits into from
Jul 12, 2024
Merged

Add simple panic messages #201

merged 3 commits into from
Jul 12, 2024

Conversation

notriddle
Copy link
Member

Fixes #200

src/lib.rs Outdated
@@ -1788,8 +1788,8 @@ impl<'a> Builder<'a> {
.is_none());
}
for tag_name in &self.clean_content_tags {
assert!(!self.tags.contains(tag_name));
assert!(!self.tag_attributes.contains_key(tag_name));
assert!(!self.tags.contains(tag_name), "{tag_name} appears in clean_content_tags and in tags at the same time");
Copy link
Member

Choose a reason for hiding this comment

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

Nit:

Suggested change
assert!(!self.tags.contains(tag_name), "{tag_name} appears in clean_content_tags and in tags at the same time");
assert!(!self.tags.contains(tag_name), "`{tag_name}` appears in `clean_content_tags` and in `tags` at the same time");

src/lib.rs Outdated
assert!(!self.tags.contains(tag_name));
assert!(!self.tag_attributes.contains_key(tag_name));
assert!(!self.tags.contains(tag_name), "{tag_name} appears in clean_content_tags and in tags at the same time");
assert!(!self.tag_attributes.contains_key(tag_name), "{tag_name} appears in clean_content_tags and in tag_attributes at the same time");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
assert!(!self.tag_attributes.contains_key(tag_name), "{tag_name} appears in clean_content_tags and in tag_attributes at the same time");
assert!(!self.tag_attributes.contains_key(tag_name), "`{tag_name}` appears in `clean_content_tags` and in `tag_attributes` at the same time");

@notriddle notriddle force-pushed the notriddle/panic-msg branch from 757cbf1 to 3ffabf6 Compare July 12, 2024 15:15
@notriddle notriddle force-pushed the notriddle/panic-msg branch from 3ffabf6 to 0fda008 Compare July 12, 2024 15:16
@notriddle notriddle merged commit 25017a4 into master Jul 12, 2024
7 checks passed
@notriddle notriddle deleted the notriddle/panic-msg branch July 12, 2024 17:49
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.

Improve error message when clean_content_tags and tags overlap
2 participants