File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ impl From<ScriptExtension> for AugmentedScriptSet {
22
22
let mut jpan = false ;
23
23
let mut kore = false ;
24
24
25
- if ext. contains_script ( Script :: Han ) {
25
+ if ext == ScriptExtension :: Single ( Script :: Common ) ||
26
+ ext == ScriptExtension :: Single ( Script :: Inherited ) ||
27
+ ext. contains_script ( Script :: Han ) {
26
28
hanb = true ;
27
29
jpan = true ;
28
30
kore = true ;
@@ -84,6 +86,12 @@ impl AugmentedScriptSet {
84
86
self . base . is_empty ( ) && ! self . hanb && !self . jpan && !self . kore
85
87
}
86
88
89
+ /// Check if the set is "All" (Common or Inherited)
90
+ pub fn is_all ( & self ) -> bool {
91
+ self . base == ScriptExtension :: Single ( Script :: Common ) ||
92
+ self . base == ScriptExtension :: Single ( Script :: Inherited )
93
+ }
94
+
87
95
/// Construct an AugmentedScriptSet for a given character
88
96
pub fn for_char ( c : char ) -> Self {
89
97
ScriptExtension :: from ( c) . into ( )
You can’t perform that action at this time.
0 commit comments