From 558b49af6d15469ad04334ab2850ff19aec1c2ce Mon Sep 17 00:00:00 2001 From: Connor Skees Date: Wed, 8 Jul 2020 10:25:37 -0400 Subject: [PATCH] better document purpose of `Identifier` --- src/common.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common.rs b/src/common.rs index 578e0f3..4f9ce1e 100644 --- a/src/common.rs +++ b/src/common.rs @@ -105,6 +105,11 @@ impl ListSeparator { } } +/// In Sass, underscores and hyphens are considered equal +/// when inside identifiers. +/// +/// This struct protects that invariant by normalizing all +/// underscores into hypens. #[derive(Debug, Clone, Eq, PartialEq, Hash)] pub(crate) struct Identifier(String);