@@ -3,8 +3,8 @@ use crate::easy::{HighlightFile, HighlightLines};
33use crate :: escape:: Escape ;
44use crate :: highlighting:: { Color , FontStyle , Style , Theme } ;
55use crate :: parsing:: {
6- BasicScopeStackOp , ParseState , Scope , ScopeStack , ScopeStackOp , SyntaxReference , SyntaxSet ,
7- SCOPE_REPO ,
6+ lock_global_scope_repo , BasicScopeStackOp , ParseState , Scope , ScopeStack , ScopeStackOp ,
7+ SyntaxReference , SyntaxSet ,
88} ;
99use crate :: util:: LinesWithEndings ;
1010use crate :: Error ;
@@ -242,7 +242,7 @@ pub enum ClassStyle {
242242}
243243
244244fn scope_to_classes ( s : & mut String , scope : Scope , style : ClassStyle ) {
245- let repo = SCOPE_REPO . lock ( ) . unwrap ( ) ;
245+ let repo = lock_global_scope_repo ( ) ;
246246 for i in 0 ..( scope. len ( ) ) {
247247 let atom = scope. atom_at ( i as usize ) ;
248248 let atom_s = repo. atom_str ( atom) ;
@@ -260,7 +260,7 @@ fn scope_to_classes(s: &mut String, scope: Scope, style: ClassStyle) {
260260}
261261
262262fn scope_to_selector ( s : & mut String , scope : Scope , style : ClassStyle ) {
263- let repo = SCOPE_REPO . lock ( ) . unwrap ( ) ;
263+ let repo = lock_global_scope_repo ( ) ;
264264 for i in 0 ..( scope. len ( ) ) {
265265 let atom = scope. atom_at ( i as usize ) ;
266266 let atom_s = repo. atom_str ( atom) ;
0 commit comments