Skip to content

Commit

Permalink
feat: change modifiers and keys to lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
lavafroth committed Jul 4, 2024
1 parent 20a7a34 commit 829e100
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ fn parse_key(component: Pair<'_, Rule>) -> Key {
match inner.as_rule() {
Rule::send => attribute |= KeyAttribute::Send,
Rule::on_release => attribute |= KeyAttribute::OnRelease,
Rule::shorthand_allow | Rule::key_base => key = unescape(inner.as_str()).to_string(),
Rule::shorthand_allow | Rule::key_base => {
key = unescape(&inner.as_str().to_lowercase()).to_string()
}
_ => {}
}
}
Expand All @@ -201,7 +203,7 @@ impl DefinitionUncompiled {
match component.as_rule() {
Rule::modifier => self
.modifiers
.push(vec![Modifier(pair_to_string(component))]),
.push(vec![Modifier(pair_to_string(component).to_lowercase())]),
Rule::modifier_shorthand | Rule::modifier_omit_shorthand => self.modifiers.push(
component
.into_inner()
Expand Down

0 comments on commit 829e100

Please sign in to comment.