mirror of
https://github.com/alecthomas/chroma.git
synced 2025-11-27 22:38:42 +02:00
fix: synthesisable entries are ignored when cloned (#465)
This commit is contained in:
6
style.go
6
style.go
@@ -265,12 +265,12 @@ func (s *Style) Get(ttype TokenType) StyleEntry {
|
||||
|
||||
func (s *Style) get(ttype TokenType) StyleEntry {
|
||||
out := s.entries[ttype]
|
||||
if out.IsZero() && s.synthesisable(ttype) {
|
||||
out = s.synthesise(ttype)
|
||||
}
|
||||
if out.IsZero() && s.parent != nil {
|
||||
return s.parent.get(ttype)
|
||||
}
|
||||
if out.IsZero() && s.synthesisable(ttype) {
|
||||
out = s.synthesise(ttype)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user