Support 0-length scopes
This commit is contained in:
parent
86bbfcda60
commit
78b24c4203
|
@ -197,7 +197,7 @@ impl Theme {
|
|||
let mut longest_len = 0;
|
||||
|
||||
for (target, style) in self.styles.iter() {
|
||||
if target.len() > longest_len && scope.starts_with(target) {
|
||||
if target.len() >= longest_len && scope.starts_with(target) {
|
||||
longest = *style;
|
||||
longest_len = target.len();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue